ParabolInc / parabol

Free online agile retrospective meeting tool
https://www.parabol.co/
Other
1.91k stars 327 forks source link

cork uWS methods #9253

Closed mattkrick closed 10 months ago

mattkrick commented 10 months ago

With Node v20 we had to bump uWS, which now warns when methods are used outside of a cork.

AC

rafaelromcar-parabol commented 10 months ago

I'm putting a P2 to this, but it could even be a P1 IMHO. It is really annoying. We have so many logs in production that it is hard to see the rest without filtering out those lines in Datadog.

rafaelromcar-parabol commented 10 months ago

Two different errors:

Error: uWS.HttpRequest must not be accessed after await or route handler return. See documentation for uWS.HttpRequest and consult the user manual.
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
at /home/node/parabol/dist/web.js:148423:44
at getReqAuth (/home/node/parabol/dist/web.js:175887:26)
Warning: uWS.HttpResponse writes must be made from within a corked callback. See documentation for uWS.HttpResponse.cork and consult the user manual.