Commit 7c341d5
git_server: log full anyhow cause chain for RL Land Service diversion errors
Summary:
A redirected RL Land Service push that fails inside the diversion path currently surfaces in scuba as a one-line summary with no underlying cause, because the five error-formatting sites in `write/rl_land_service_diversion.rs` use bare `{}` (anyhow Display) on `anyhow::Error` values. `{}` prints only the outermost message; `{:#}` (alternate Display) prints the full cause chain joined with `: `.
This change matches the convention already established in the MRL service (`facebook/multi_repo_land_service/src/logging.rs`, which uses `{:#}` consistently for anyhow chain materialization). Three `error!` lines switch to `{:#}`. The `anyhow::bail!` and `.map_err(|e| anyhow::anyhow!(...))` sites switch to `.context(...)` / `.with_context(...)`, which preserves the underlying Thrift error as a structured source rather than collapsing it into a flat string. Both forms produce the same chain when later formatted with `{:#}` via `info.first_error()` in `git_server/src/scuba.rs`.
No behaviour change beyond log/scuba string content. Sites that build error strings from typed Thrift fields (`LandResult::failure`, `BRANCH_NOT_ENABLED`'s `invalid_req.message`) and `info!` lines are intentionally unchanged.
Design: `facebook/multi_repo_land_service/docs/plans/2026-05-06-anyhow-chain-logging-design.md` (Diff A).
Reviewed By: YousefSalama
Differential Revision: D104042935
fbshipit-source-id: 2d8245a9f40747bc010a586cfe735d0410bff0aa1 parent 6a0bf98 commit 7c341d5
1 file changed
Lines changed: 16 additions & 15 deletions
Lines changed: 16 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
| |||
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
0 commit comments