@modelcontextprotocol/sdk
    Preparing search index...

    Function parseErrorResponse

    • Parses an OAuth error response from a string or Response object.

      If the input is a standard OAuth2.0 error response, it will be parsed according to the spec and an instance of the appropriate OAuthError subclass will be returned. If parsing fails, it falls back to a generic ServerError that includes the response status (if available) and original content.

      Parameters

      • input: string | Response

        A Response object or string containing the error response

      Returns Promise<OAuthError>

      A Promise that resolves to an OAuthError instance