Skip to content

4.97.1 - Log source file and line info for errors in ErrorMiddleware when possible

Compare
Choose a tag to compare
@penny-for-vapor penny-for-vapor released this 10 May 02:35
· 11 commits to main since this release
e69a55b

What's Changed

Log source file and line info for errors in ErrorMiddleware when possible by @gwynne in #3187

Ever since the last changes to ErrorMiddleware (by me, naturally), the error logging fails to correctly report file/line/function information even when the error has that data available. We now correctly pass these along to the logging machinery. The error responses sent to clients are unchanged.

Additional changes:

  • Restore recognition of the DebuggableError protocol (reason and source location information for such errors are now used again).
  • Handle generating error responses slightly more efficiently.
  • Include the original error message in the fallback text if encoding an error to JSON fails.
  • Improve the correctness of the reason messages used for DecodingErrors.
This patch was released by @gwynne

Full Changelog: 4.97.0...4.97.1