It seems that the exception message starts with that error, followed by \n, and the underlying stream response looks like a json string with the error field. But parsing either of those seems very hacky - I can't even tell if the stream will always be json or whether the construction of the exception message will always remain like this.
Please provide a proper getter for the OAuth error.
I can't seem to find an exposed value for the error response in case of an
IdentityProviderException
.According to https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-20#section-5.2 there should be a required
error
repsonse field in case an OAuth call runs into problems. (Likeinvalid_grant
,invalid_scope
, etc.).It seems that the exception message starts with that error, followed by
\n
, and the underlying stream response looks like a json string with theerror
field. But parsing either of those seems very hacky - I can't even tell if the stream will always be json or whether the construction of the exception message will always remain like this.Please provide a proper getter for the OAuth error.
Thank you