Skip to content

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

@coby9241

Description

@coby9241

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions