Skip to content

repo-updater: return 401/403 codes instead of 500

Administrator requested to merge CLOUD-67-make-repo-updater-return-error-code into main

Created by: rafax

Repo updater /sync-external-service always returns 500 error code in case of errors, hiding the fact that certain errors can be caused by invalid credentials / insufficient permissions. This PR changes error handling logic to return 401/403 errors, and keeps the old logic for other cases.

Context: In CLOUD-67 frontend incorrectly retried calls that had invalid credentials - to be able to skip retries we need the HTTP code to be set correctly (instead of retrying 401/403 masked as 500). #26190 adds logic to skip retries of 401/403.

Merge request reports

Loading