Skip to content

Throw UnreachableException for ambiguous shortnames in Production #3453

@knuhau

Description

@knuhau

Problem

When an organization has multiple shortnames in Ressursregisteret and the org claim is missing from the token, the system cannot determine the correct mapping. We need to prevent this ambiguity from causing silent failures in production.

Proposed Solution

Update the transmission logic to handle multiple shortnames based on the environment:

Production: Throw an UnreachableException if a 1:1 mapping cannot be resolved. This ensures we maintain data integrity and get notified of the issue.

Test/Development (e.g., TT02): Retain current behavior (warning)

Metadata

Metadata

Labels

No labels
No labels

Projects

Status

Testing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions