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

Missing error handling for API statuses and missing response code in result #23

Open
szilardd opened this issue Jan 28, 2019 · 0 comments

Comments

@szilardd
Copy link

  1. The SDK doesn't seem implement all status codes that are specified in the API
    https://reference.assemblypayments.com/#error-codes

For example if an error 500 or 408 occurs, what will happen in the SDK, will it throw an exception which has to be handled differently than the other type of errors that throw an ApiErrorsException ?

Would be good to handle all in the same way

  1. Only statuses 400, 422 are handled and these are not provided in the ApiErrorsException class, you have to rely on the error message to determine the type of error if you want to give meaningful error messages to your users.

Would be good to include the status code at least in the ApiErrorsException object.

https://github.com/AssemblyPayments/promisepay-dotnet/blob/master/PromisePayDotNet/Implementations/AbstractRepository.cs#L113

  1. Status 400 (BadRequest) is not documented in the API error codes page, though it is handled in the SDK.

https://github.com/AssemblyPayments/promisepay-dotnet/blob/master/PromisePayDotNet/Implementations/AbstractRepository.cs#L115

https://reference.assemblypayments.com/#error-codes

Would be good to document it in the API error codes page as well to be consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant