Skip to content

Conversation

@prk-Jr
Copy link
Collaborator

@prk-Jr prk-Jr commented Jan 29, 2026

Replace unwrap() with expect() or ? operator in production code

Resolves: #192

The base64 decode in compute_encrypted_sha256_token cannot fail
because it operates on data just encoded by encode_url. Changed
from silent error recovery to an explicit expect with documentation
explaining the invariant.

Resolves: #192
@prk-Jr prk-Jr linked an issue Jan 29, 2026 that may be closed by this pull request
@prk-Jr prk-Jr self-assigned this Jan 29, 2026
Copy link
Collaborator

@ChristianPavilonis ChristianPavilonis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue #192 has 5 files to look at.

If they didn't require changes please state why those unwrap(), unwrap_or_default(), etc. are not an issue.

The unwraps in proxy.rs are in the tests but could probably use expects in case those tests fail for better visibility as to why they failed.

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.

Replace unwrap() with expect() or ? operator in production code

3 participants