Files
sdk/pkg/dds/lib
Jason Simmons 217bfed9bd [ DDS ] Add middleware that converts exceptions thrown by handlers into error responses
Handler functions may return a Future<Response> that completes with an error.  If that happens, then the top level error handling in the Shelf server will try to log the error to stderr.

But this will fail because DDS closes its stderr at startup.  So Shelf will not write any response to the client, and the client will time out.

This PR adds a middleware to the DDS pipeline that receives errors thrown by the pipeline's handlers and returns a failure response.

Change-Id: I31beaf6abb0cbb42137c6b03f6081809de5d7119
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405681
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-01-28 10:10:57 -08:00
..