Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR improves event outcome reporting by mapping exception types to appropriate EventOutcome values and returning 503 for overloaded exceptions.
Issues found (ranked by severity):
- Build-breaking: wrong variable name
evsexception—reportFailure()names the parameterexceptionbut the body usese. Same issue in therequest()catch block. This won't compile. - Build-breaking:
RequestOutcomedoes not exist — The code usesRequestOutcome::PROXY_DISCONNECTandRequestOutcome::EXCEPTION, but the type isEventOutcome. There is noRequestOutcomein the codebase. - Build-breaking:
EventOutcome::MEMORY_LIMIT_EXCEEDEDdoes not exist — The correct enum value isEventOutcome::EXCEEDED_MEMORY(seeoutcome.capnpand existing usage in the codebase). Similarly, there is noPROXY_DISCONNECT; the closest match isEventOutcome::RESPONSE_STREAM_DISCONNECTED.
|
I'm Bonk, and I've done a quick review of your PR. This PR improves event outcome reporting by mapping exception types to appropriate 3 build-breaking issues found (all in
Suggestions with fixes have been posted inline on the PR. |
|
The generated output of |
a0cc721 to
f84d582
Compare
2031bc6 to
17c5011
Compare
This includes a number of smaller changes to provide better event outcome handling and more closely correspond to the edge runtime behavior. - In server.c++, report exceededMemory and responseStreamDisconnected outcomes properly. This should cover all outcomes that can be reported using exceptions in workerd so far - Return a 503 error for overloaded-type exceptions - matches what we already do in WorkerEntrypoint::request() - Add a missing exception detail to ensure actor-cache exception leads to memoryExceeded outcome - Simplify reportFailure() calls based on FailureSource::OTHER being the default value for the 2nd parameter
Outcomes via reportFailure() will be reported over outcomes reported through the event outcome, so we need to set this here so that the right outcome gets reported to observability.
17c5011 to
7b401e7
Compare
This includes a number of smaller changes to provide better event outcome handling and more closely correspond to the edge runtime behavior.
Also see the downstream PR