fix: handle unexpected API responses with clean errors #167

Merged
fuzzy merged 1 commit from fix/134-forgejo-keyerror into main 2026-07-06 08:50:43 +00:00
Owner

Wraps data["id"] access in get_user_id() and get_repo_id() with try/except for KeyError, TypeError, ValueError to raise ForgejoError with a descriptive message instead of a raw traceback.

Closes #134

Wraps `data["id"]` access in `get_user_id()` and `get_repo_id()` with try/except for `KeyError`, `TypeError`, `ValueError` to raise `ForgejoError` with a descriptive message instead of a raw traceback. Closes #134
fix(forgejo): handle unexpected API responses with clean errors
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m32s
9a5f746f0b
Wrap data['id'] access with try/except to raise ForgejoError
instead of raw KeyError/TypeError/ValueError from unexpected
API responses.

Closes #134
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 08:37:46 +00:00
the.auditor left a comment

Audit Review — PR #167

Clean fix for #134. data["id"] wrapped in try/except for KeyError, TypeError, ValueError, raising ForgejoError with descriptive message per endpoint (user '{username}' / repo '{owner}/{repo}').

No suggestions.

Summary

Result: COMMENT — no issues found.

## Audit Review — PR #167 Clean fix for #134. `data["id"]` wrapped in try/except for `KeyError`, `TypeError`, `ValueError`, raising `ForgejoError` with descriptive message per endpoint (`user '{username}'` / `repo '{owner}/{repo}'`). No suggestions. ## Summary **Result:** COMMENT — no issues found.
the.auditor left a comment

APPROVED. API response handling improved, closes #134. Merge when ready.

APPROVED. API response handling improved, closes #134. Merge when ready.
fuzzy force-pushed fix/134-forgejo-keyerror from 9a5f746f0b
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m32s
to 4c1044ceb0
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
2026-07-06 08:39:53 +00:00
Compare
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 08:39:57 +00:00
fuzzy force-pushed fix/134-forgejo-keyerror from 4c1044ceb0
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
to accda4ef30
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m25s
2026-07-06 08:46:44 +00:00
Compare
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 08:46:53 +00:00
fuzzy merged commit accda4ef30 into main 2026-07-06 08:50:43 +00:00
fuzzy deleted branch fix/134-forgejo-keyerror 2026-07-06 08:50:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea!167
No description provided.