abstrask opened a new pull request, #9231: URL: https://github.com/apache/devlake/pull/9231
### Summary `shared.ApiOutputError` (and its siblings) and the plugin handler wrapper in `router.go` pass an upstream service's 401 through as DevLake's own HTTP 401. Config UI treats any 401 as an expired DevLake session and redirects to `/login`. For example, a GitHub App token request rejected by GitHub during `POST /blueprints/:id/trigger` sends the user to the login page (which, with `AUTH_ENABLED` unset, shows "Single Sign-On is not configured"). DevLake's own session and API key 401s are written directly by the auth middleware and never go through these paths, so this maps an upstream 401 to 502 Bad Gateway there. All other status codes are unchanged. With that in place, the plugin connection test exemption added to `config-ui/src/utils/request.ts` in #9159 is no longer needed, so the second commit removes it. Note: this changes the API status code from 401 to 502 for any endpoint that surfaces an upstream 401, including plugin connection tests. ### Does this close any open issues? Part of #9220 (the 401 passthrough part only). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
