There is middleware that returns context errors with the appropriate status codes, falling back to the internal error code for unknown errors. By returning errors directly instead of coercing them to strings, the middleware is able to handle them correctly.
This issue is prevalent across the code base, this PR does not tackle all instances of it, but it's a step in the right direction.
There is middleware that returns context errors with the appropriate status codes, falling back to the internal error code for unknown errors. By returning errors directly instead of coercing them to strings, the middleware is able to handle them correctly.
This issue is prevalent across the code base, this PR does not tackle all instances of it, but it's a step in the right direction.