-
Notifications
You must be signed in to change notification settings - Fork 31
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
NPE in TransactionsApi.getTransactionById() if transaction does not exist #28
Comments
Hi, I would like to take up this issue. Kindly let me know if help is still required. |
@kai18 sure. any help is most welcome. Thanks for your contribution. Once you have fixed this issue. Send a PR to this repo. Cheers! |
@innoprenuer Thanks! Just so we are clear, there needs to be an exception hierarchy that forces the user to handle this particular scenario. Right? That is what we are expecting here? |
@kai18 This exception happens because we are expecting valid transaction object but in case of valid response (404, 500) we don't get transaction object and so deserialization doesn't work as there is no check for error codes. So, solution should go somewhere here - take a look here. We can maybe check for error codes and throw 'TransactionNotFound' exception if error code is 404. |
@innoprenuer Thanks for the confirmation! I have raised the PR. Please review and let me know of any changes. |
@innoprenuer Adding this checked exception breaks backwards compatibility, as, when people upgrade, they'll be forced to handle this exception. I was just wondering, maybe we should do this across APIs in a single go? If that's the case, please let me know of any changes in my current PR, and I can do the same for all APIs |
@ttmc @innoprenuer Is this project still under active development? |
thanks for the info @ttmc |
Driver version: 1.1 and master(cae61d8)
Response:
{"message":"Not found","status":404}
Stacktrace:
The text was updated successfully, but these errors were encountered: