Heimdall start refusal: log the HTTP status and Heimdall's error code #79

Merged
heimdall merged 2 commits from heimdall/start-refusal-status into main 2026-11-12 14:48:31 +00:00
Member

HeimdallAuthService.StartAsync threw Heimdall rejected the auth start. with nothing to tell a wrong app secret (401 app_auth_required) from a Heimdall fault. The exception, and so the Heimdall start refused: journal line, now reads Heimdall rejected the auth start (HTTP 401, app_auth_required).

The error code is shown only when Heimdall's body has a string error that is 1-64 chars of [a-z0-9_]; any other body text (detail, non-JSON, nested, hostile) is never echoed, and the app secret is never involved.

Test first: A_refused_start_logs_the_status_and_a_well_formed_error_code_and_nothing_else_from_the_body (5 cases) failed before the change; the existing refusal theory now expects (HTTP 500). Heimdall-filtered suite: 155 pass. Not deployed.

🤖 Generated with Claude Code

`HeimdallAuthService.StartAsync` threw `Heimdall rejected the auth start.` with nothing to tell a wrong app secret (401 `app_auth_required`) from a Heimdall fault. The exception, and so the `Heimdall start refused:` journal line, now reads `Heimdall rejected the auth start (HTTP 401, app_auth_required).` The error code is shown only when Heimdall's body has a string `error` that is 1-64 chars of `[a-z0-9_]`; any other body text (detail, non-JSON, nested, hostile) is never echoed, and the app secret is never involved. Test first: `A_refused_start_logs_the_status_and_a_well_formed_error_code_and_nothing_else_from_the_body` (5 cases) failed before the change; the existing refusal theory now expects `(HTTP 500)`. Heimdall-filtered suite: 155 pass. Not deployed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The journal said only 'Heimdall rejected the auth start', which cannot tell a wrong app secret (401 app_auth_required) from a fault. The message now carries the status and, when the body has one, an error code that is a short snake_case token; no other body text is echoed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Soul pass on c085cead: a refusal with an unsupported charset escaped as a 500, the body was read without a bound, and the 64-character cap was untested.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Bifrost!79
No description provided.