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
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
OAuthErrorwill be returned with the appropriate error code. If parsing fails, it falls back to a genericServerErrorthat includes the response status (if available) and original content.