-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Describe the bug
When server returns a 403 error with an error code and error message, we only get returned a generic User permissions error that is inaccurate and misleading.
How to reproduce
- It depends on the backend response, but as long as you have a 403 error from the backend with an error code and message, it will always return "User permissions error".
Expected behavior
- It should show the correct error message instead of a blanket User permissions error.
Screenshots
Actual Faraday response from a live API call:

Desktop (please complete the following information):
- ruby Version: 2.7.2
- Library Version: 6.1.0
Additional context
Trying to make an online payment and getting this error, while trying to debug and fix the user permissions I found that it does not have anything to do with permissions.
The offending line can be found in https://github.com/Adyen/adyen-ruby-api-library/blob/develop/lib/adyen/client.rb#L172
Either the backend is not respecting the exclusive usage of 403 status being a user permissions error or the SDK is not updated to reflect the broader subset of 403 errors that the backend provides.