MCP TypeScript SDK (V2)
    Preparing search index...
    • 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 OAuthError will be returned with the appropriate error code. 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