Add Gitea API error logging #24

Merged
probablycorey merged 1 commits from probablycorey/spike-error-debug into main 2026-03-10 19:18:17 +00:00

Summary

Add detailed structured logging for Gitea API errors to diagnose intermittent 401 failures.

When Gitea API calls fail, the logs now capture:

  • HTTP status code
  • Failed endpoint URL
  • First 500 chars of response body (often contains error reason)
  • Token prefix (first/last 4 chars + length) to verify which token is in use without leaking the full value

This will help distinguish between missing token, invalid token, or other Gitea-side rejections.

Testing

Logs are structured and persisted to JSONL files. Monitor next deployment for any API errors and check the gitea-api-error log events.

## Summary Add detailed structured logging for Gitea API errors to diagnose intermittent 401 failures. When Gitea API calls fail, the logs now capture: - HTTP status code - Failed endpoint URL - First 500 chars of response body (often contains error reason) - Token prefix (first/last 4 chars + length) to verify which token is in use without leaking the full value This will help distinguish between missing token, invalid token, or other Gitea-side rejections. ## Testing Logs are structured and persisted to JSONL files. Monitor next deployment for any API errors and check the `gitea-api-error` log events.
probablycorey added 1 commit 2026-03-10 19:10:54 +00:00
Add detailed logging for Gitea API errors to diagnose 401 issues.
Some checks failed
CI / test (pull_request) Has been cancelled
829e1ea1dc
Extracts token presence/length, response status, failed URL, and response body (first 500 chars) into structured logs. This will help identify whether token is missing, invalid, or if Gitea is rejecting for another reason.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
probablycorey merged commit bb54e1048a into main 2026-03-10 19:18:17 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 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: probablycorey/workshop#24
No description provided.