Skip to content

Include error causes in logs - #14749

Merged
Turbo87 merged 19 commits into
rust-lang:mainfrom
Turbo87:error-cause-logging
Sep 21, 2026
Merged

Turbo87 merged 19 commits into
rust-lang:mainfrom
Turbo87:error-cause-logging

Conversation

@Turbo87

@Turbo87 Turbo87 commented Sep 21, 2026

Copy link
Copy Markdown
Member

Error logs often stopped at an outer context message, hiding the failure that caused it. This PR adjusts the code so that most of our logs now include the source chains. Formatting changes are limited to sites where the additional detail is actually useful (e.g. lettre errors print the source chain by default). Client-facing responses remain unchanged.

The `reqwest::Error` retains the request URL and any HTTP error status.
The Fastly error supplies static context, and direct logging callers print
the source chain without repeating those details.
The checker prints the source chain so malformed archives report the underlying I/O failure.
The connection setup includes source messages before converting PostgreSQL errors into `BadConnection` strings. Connection and configuration failures retain the details needed to diagnose them.
@Turbo87 Turbo87 added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Sep 21, 2026
@Turbo87
Turbo87 merged commit 70cb734 into rust-lang:main Sep 21, 2026
12 checks passed
@Turbo87
Turbo87 deleted the error-cause-logging branch September 21, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants