mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 03:38:38 +00:00
826c65d0ec
## Summary When an Actions runner's registration has been deleted (or the UUID/token is invalid), `FetchTask` and other authenticated runner RPCs currently return **HTTP 500** ## Change - Return `connect.NewError(connect.CodeUnauthenticated, ...)` via a small `unregisteredRunnerError()` helper for both unregistered / bad-token paths in the interceptor. - Leave Internal `status.Error` paths unchanged (those should remain 5xx). - Add a unit test asserting `connect.CodeOf(err) == connect.CodeUnauthenticated`. Fixes #39576 --------- Signed-off-by: Alex Mitre <mitre88@users.noreply.github.com> Co-authored-by: Alex Mitre <mitre88@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>