Can't make it work with HAPI
See original GitHub issueHello, I can’t make it work with HAPI (version 20).
I’m following the documentation :
const server: Server = hapiServer({
host,
(...)
})
await server.register({
plugin: rTracer.hapiPlugin
})
(other plugins, routes, ...)
And in a route :
handler: (request: Request, h: ResponseToolkit) => {
const requestId = rTracer.id()
console.log(`requestId: ${requestId}`)
rTracer.id() always returns undefined
By debugging in rtracer.js, I can see that I enter als.enterWith
with a generated id, but when the route handler is called als.getStore()
alwasy returns undefined
What am I missing ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Can't access payload during auth strategy #4164 - hapijs/hapi
This allows auth schemes that rely on the payload to do some of their work after the payload is processed and available. Another...
Read more >Cannot up the basic sever written with hapi.js - Stack Overflow
I followed their getting started guide, installed hapi and put code that is required to spin up a basic server, inside index. js...
Read more >Routing - hapi.dev
When defining a route in hapi, you need three basic elements: the path, the method, and a handler. These are passed to your...
Read more >hapi — How to Fix AssertionError, Cannot validate HEAD or ...
In this tutorial, you'll walk through the steps to fix the assertion “Cannot validate HEAD or GET requests”. hapi Series Overview. hapi ...
Read more >Seven Secrets to a Happy ADHD Relationship
Sometimes you can't even remember where you went, what you did, and who you were ... As you can see, he is working...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out it was https://www.npmjs.com/package/hapi-require-https
Thanks for your quick reply !
Your sample works, so I will have to disable other plugins and routes to find what’s the issue