-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
@promster/hapi
in version 6.1.0
causes an unhandled promise rejection
#721
Comments
Thanks for the issue and sorry for the trouble. I will try a fix to access the headers optionally. I found the documentation on accessing headers with Hapi quite confusing to be honest. |
I am releasing |
Hi. Thanks for the quick response and fix. The issue doesn't manifest itself anymore for me with the new version. I had a quick look at the fix and have one question about it: Won't the fix lead to empty requests & responses not being included in metrics anymore, because of e.g. |
That's a good point. You'd suggest that an empty request or response would default to 0, right? Would you mind spinning up a PR for it? Extra ✋🏼 for a test case :) |
Released in a new version to default to 0. |
Describe the bug
@promster/hapi
in version6.1.0
causes an unhandled promise rejection when using raw response object to build response in hapi:This can be a problem for integration with other libraries (e.g. NextJS or Apollo) as those might use the raw response to write their responses.
To Reproduce
Steps to reproduce the behavior: Run the minimal example code from below.
/does-not-work
Expected behavior
Promster does not include the response in the response size metric, or reads the header from the raw response.
Additional context
Minimal example:
The text was updated successfully, but these errors were encountered: