-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose error code/response body to OpenPaymentsClientError
#482
Comments
Also, would be helpful to have access to error messages from the resource server |
GNAPErrorCode
to OpenPaymentsClientError
in clientOpenPaymentsClientError
in client
OpenPaymentsClientError
in clientOpenPaymentsClientError
For this, I merged in a PR in rafiki that adds proper GNAP error objects in the auth server: We will publish a new version of Rafiki (alpha 14) such that the test wallet can be updated with this new change. In the meantime, I'll edit the client so it can surface up the proper error (for now, the OpenPaymentsClientError will contain In my opinion this should be a larger effort to actually add all of the possible error codes to both the AS and the RS specs, so they are obvious to the users of Open Payments 👍 I'll bring it up in the next Open Payments catch up call |
Can possibly include in error description until codes are finalized? |
Context: Web Monetization extension
If a user revokes key from wallet, all subsequent requests (to auth.rafiki.money in this case) error with
HTTP 400
+invalid_client
. But this code isn't available to client to check whether it's a 400 due toinvalid_client
or some other reason. The response body saysinvalid_client
, but we can't access the body on error.Exposing this (
GNAPErrorCode
in case of auth server) inOpenPaymentsClientError
would help us gracefully handle interledger/web-monetization-extension#332The text was updated successfully, but these errors were encountered: