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

Issue #468 handle error object passed into raise error #469

Conversation

virginiam1203
Copy link
Contributor

Code to address bug in Issue #468 #468

Added a check for an error object passed into the method with "boomify" and handle it accordingly so boom will not throw an "Unable to wrap non-error object" error.

Tidied up the validate_func tests to match other test files with a separate server setup. This allowed for better debugging in my experience.

Separated out tests into specific cases.

Techncially the 'ASPLODE' test was also impacted by this bug, but the test did not catch it because the Hapi server wraps any 500 error in a generic "Internal Server Error" message, so I added a new case that throws a 404 error and is broken without the bug fix.

@nelsonic nelsonic self-assigned this May 26, 2024
@nelsonic nelsonic added this to More ToDo ThanCanEver Be Done in Nelson's List via automation May 26, 2024
Copy link
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

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

@virginiam1203 thanks very much for this addition to error object handling! 🎉

@nelsonic nelsonic merged commit 00e5759 into dwyl:main Jun 4, 2024
4 checks passed
Nelson's List automation moved this from More ToDo ThanCanEver Be Done to Done Jun 4, 2024
asntc added a commit that referenced this pull request Jun 4, 2024
PR: Handle Error Object passed into raise error (Boomify) #468 ref: #469
@nelsonic
Copy link
Member

nelsonic commented Jun 4, 2024

@virginiam1203 your code is included in hapi-auth-jwt2@10.6.0 📦 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Nelson's List
  
Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants