Skip to content

Conversation

@TechhDan
Copy link
Contributor

@TechhDan TechhDan commented Jun 22, 2022

Fix: Allow Standard Exception to handle strings

Our company started using this SDK and we noticed that when an object is not found we received a blank exception message. Looking into the code I noticed that the Payment Rails API server is sending back JSON strings with the code and message. However, the Standard Exception does not take into account strings such as this case. The result is that the exception comes out blank. This PR fixes the exception to handle both strings and arrays.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, create a GitHub Issue in this repository.

@Aman-Aalam Aman-Aalam self-requested a review July 12, 2022 22:41
@Aman-Aalam Aman-Aalam self-assigned this Jul 12, 2022
@Aman-Aalam Aman-Aalam mentioned this pull request Jul 13, 2022
7 tasks
Copy link

@denizaygundev denizaygundev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

I am also experiencing this issue.

@Aman-Aalam Aman-Aalam merged commit da59df5 into trolley:master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants