Skip to content

azure auth error handling#74

Open
shivv23 wants to merge 2 commits intoc2siorg:mainfrom
shivv23:codex/pr2-azure-auth-error-handling
Open

azure auth error handling#74
shivv23 wants to merge 2 commits intoc2siorg:mainfrom
shivv23:codex/pr2-azure-auth-error-handling

Conversation

@shivv23
Copy link

@shivv23 shivv23 commented Mar 13, 2026

Summary

This PR hardens Azure storage auth signing by replacing panic paths with typed errors and improving canonicalized resource handling.

Changes

  • Updated AzureAuth::generate_headers to return Result<_, CloudError> instead of panicking.
  • Replaced expect/unwrap with explicit CloudError::Auth mapping.
  • Improved canonicalized query handling for Azure signed resources.
  • Updated Azure blob client methods to propagate auth-generation errors.
  • Added unit tests for:
    • missing AZURE_STORAGE_KEY
    • invalid base64 key
    • successful header generation with valid key

Why

  • Prevents runtime panics in auth-critical paths.
  • Gives callers actionable, typed errors.
  • Improves robustness for real-world request query shapes.

Validation

  • cargo check --lib

@shivv23 shivv23 changed the title Codex/pr2 azure auth error handling azure auth error handling Mar 13, 2026
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.

1 participant