Problem
- Callers currently need to inspect raw status codes to distinguish authentication, permission, not-found, and server failures.
Change
- Adds a small HTTPErrorCategory for 401, 403, 404, and 5xx responses.
- Exposes httpStatusCode and httpErrorCategory on ServiceError and AuthenticationError.
- Keeps the existing AuthenticationError cases intact and centralizes status-to-auth-error mapping.
Tests
- DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test
Problem
- Callers currently need to inspect raw status codes to distinguish authentication, permission, not-found, and server failures.
Change
- Adds a small HTTPErrorCategory for 401, 403, 404, and 5xx responses.
- Exposes httpStatusCode and httpErrorCategory on ServiceError and AuthenticationError.
- Keeps the existing AuthenticationError cases intact and centralizes status-to-auth-error mapping.
Tests
- DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test