Description
Raised when the API key is missing, malformed, or rejected by the server (HTTP 401). Should tell the developer exactly what is wrong: missing key, wrong key format, or key revoked.
Proposed Steps
- Define
AuthenticationError(ShadeError) in errors.py.
- Carry an optional
hint field with corrective guidance (e.g. "Check that you're using a secret key, not a public key").
- The HTTP client raises this on 401 responses.
- Config validation also raises this before any network call.
Acceptance Criteria
- A 401 API response raises
AuthenticationError.
error.hint contains actionable guidance.
- Raised immediately when
shade.api_key is None and a resource method is called.
- Subclasses
ShadeError.
Description
Raised when the API key is missing, malformed, or rejected by the server (HTTP 401). Should tell the developer exactly what is wrong: missing key, wrong key format, or key revoked.
Proposed Steps
AuthenticationError(ShadeError)inerrors.py.hintfield with corrective guidance (e.g. "Check that you're using a secret key, not a public key").Acceptance Criteria
AuthenticationError.error.hintcontains actionable guidance.shade.api_keyisNoneand a resource method is called.ShadeError.