You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Surface the actual Gitea API error when integration auth fails #13786
When the Gitea integration is configured but fails to authenticate, Orca only shows a generic message: "Gitea credentials are configured but could not authenticate. Check the token, API base URL, and repository permissions, then restart Orca if environment variables changed." The actual cause is discarded, so users cannot tell what to fix.
Real case: a token that was valid but lacked the required API scope. Gitea returned a precise, actionable error body that Orca's client dropped before surfacing anything:
{"message":"token does not have at least one of required scope(s), required=[read:user], token scope=write:package,write:issue,write:repository","url":"https:///api/swagger"}
Because the body is discarded on non-2xx responses, the integration card cannot explain why auth failed and the user has to reverse-engineer the cause.
Proposed solution
When a Gitea API request returns a non-2xx status, surface the server's error message to the user instead of the generic "could not authenticate" copy. Specifically:
Parse the Gitea error body (e.g. the message field returned by the API) and include it in the integration status/card so users see the actionable cause, such as a token missing the required read:user scope.
Keep the token and any sensitive URL query values redacted.
Fall back to the existing generic message when the API returns no usable body.
The Gitea client currently reads and discards the response body on failure, so surfacing it is a small, low-risk change.
Alternatives or additional context
Logging the Gitea error body to the application log only would be a lighter-touch alternative, but it is less discoverable than showing it in the integration card.
The generic message already points at token/URL/permissions; adding the concrete API error (e.g. missing read:user scope) would turn that guidance into a direct fix.
Activity
fix(gitea): surface API auth error messages in Settings
fix(gitea): surface API auth error messages in Settings
fix(gitea): surface sanitized API auth error messages in Settings (st…