Skip to content
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

Handling errors from Xendit's APIs with no error_code #30

Open
coby9241 opened this issue Mar 26, 2021 · 0 comments
Open

Handling errors from Xendit's APIs with no error_code #30

coby9241 opened this issue Mar 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@coby9241
Copy link

Sometimes due to connectivity issues etc. Xendit APIs can return error responses that do not conform to XenditError standard (aka not have the error_code), or it may not even be a valid JSON (e.g. error from Nginx Gateway which is in HTML format). However, some of the APIs may map the http error from the API to the XenditError object, and since it does not have the error_code field it results in an exception that error_code does not exist. This obscures the user from the actual error they encounter. This needs to be

An example of it can be seen below:
image

@luminto17 luminto17 added the enhancement New feature or request label Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants