Skip to content

fix(validator): log admin API internal errors - #2517

Open
sergerad wants to merge 1 commit into
sergerad-validator-share-hardeningfrom
sergerad-validator-admin-api
Open

fix(validator): log admin API internal errors#2517
sergerad wants to merge 1 commit into
sergerad-validator-share-hardeningfrom
sergerad-validator-admin-api

Conversation

@sergerad

@sergerad sergerad commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part 4 of a 4-PR stack formalizing the validator admin API (#2455). Closes #2455.

Internal failures in the admin handlers were mapped to generic 500 messages with the underlying error discarded entirely. These are plain axum handlers — not covered by the miden_instrument(err) fault reporting the gRPC services get — so a database failure left no trace anywhere: no log, no trace, no detail in the response.

ApiError::internal now requires the cause and logs it with its full source chain via ErrorReport::as_report before returning the generic message, matching the ntx-builder precedent (log the detail, return a generic message). Making the cause a required argument means it cannot be discarded by accident at future call sites.

Stack: #2531#2532#2533#2517

Changelog

changelog = "none"
reason    = "Internal change only."

@sergerad sergerad changed the title Sergerad validator admin api wip: validator admin api Aug 27, 2026
@sergerad
sergerad force-pushed the sergerad-validator-admin-api branch from ce18d90 to ea5a42d Compare August 31, 2026 01:18
@sergerad
sergerad changed the base branch from next to sergerad-validator-share-hardening August 31, 2026 01:19
@sergerad sergerad changed the title wip: validator admin api fix(validator): log admin API internal errors Aug 31, 2026
@sergerad
sergerad force-pushed the sergerad-validator-admin-api branch from ea5a42d to 2765c08 Compare August 31, 2026 02:13
@sergerad
sergerad force-pushed the sergerad-validator-admin-api branch from 2765c08 to a94a2d2 Compare August 31, 2026 02:28
@sergerad
sergerad marked this pull request as ready for review August 31, 2026 02:35
@sergerad
sergerad force-pushed the sergerad-validator-admin-api branch from a94a2d2 to 8cf624d Compare August 31, 2026 02:50
Internal failures in the admin handlers were mapped to generic 500
messages with the underlying error discarded entirely: these are plain
axum handlers, not covered by the miden_instrument(err) fault reporting
the gRPC services get, so a database failure left no trace anywhere.
Make ApiError::internal take the cause and log it with its source chain
via ErrorReport::as_report, matching the ntx-builder precedent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sergerad
sergerad force-pushed the sergerad-validator-admin-api branch from 8cf624d to 33ab15c Compare August 31, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formalize the Validator admin API

1 participant