Skip to content

Add tests for TrustedServerError HTTP status mapping #448

@prk-Jr

Description

@prk-Jr

Description

TrustedServerError::status_code() in crates/common/src/error.rs has no direct tests asserting the HTTP status mapping for each error variant. A regression here would silently change client behavior and monitoring semantics.

Done when

  • Add deterministic tests covering each public error variant to status code mapping.
  • Assert representative server-side and client-side errors map to the expected HTTP responses.
  • Keep the scope limited to mapping coverage, not unrelated error refactors.

Affected area

  • Core (synthetic IDs, cookies, GDPR)

Additional context

Source: test_gap.md, section HTTP Status Code Mapping Not Validated.
Parent issue: #396
Related: #437 covers leaked error context; this issue is specifically for missing mapping tests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions