Fix doc examples to use ? instead of .expect() #5

Open
opened 2026-07-25 11:16:30 +00:00 by GKaszewski · 0 comments
Owner

Severity: Low

The usage example in Keycloak::from_context doc comment uses .expect("Failed to create Keycloak layer") which will panic in production if Keycloak is misconfigured.

Doc examples should demonstrate ? or proper error handling to set the right example for consumers.

**Severity: Low** The usage example in `Keycloak::from_context` doc comment uses `.expect("Failed to create Keycloak layer")` which will panic in production if Keycloak is misconfigured. Doc examples should demonstrate `?` or proper error handling to set the right example for consumers.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/loco-keycloak-auth#5