Skip to content

fix: add JSON error handling to auth config loader (import of github/spec-kit#3836) - #125

Open
one-kash wants to merge 1 commit into
mainfrom
import/pr-3836
Open

fix: add JSON error handling to auth config loader (import of github/spec-kit#3836)#125
one-kash wants to merge 1 commit into
mainfrom
import/pr-3836

Conversation

@one-kash

Copy link
Copy Markdown

Imported from upstream PR github#3836
Original author: @Quratulain-bilal
Original head branch: fix/auth-json-error-handling


Summary

Wrap json.loads() in load_auth_config() with try/except to catch malformed JSON.

Changes

  • authentication/config.py: Catch JSONDecodeError and raise clean ValueError

Wrap json.loads() in load_auth_config() with try/except to catch
JSONDecodeError and raise a clean ValueError with a descriptive
message, matching the convention used for all other validation
failures in the same function.
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.

2 participants