Skip to content

Reintroducing better error messages for git endpoint validation

Patrick Cyiza requested to merge 419642-error-messages-for-pull-mirroring into master

What does this MR do and why?

This MR reintroduce the reverted MR !132854 (merged)

Revert: !134645 (merged)

See #428649 (comment 1610337010) as for why it was reverted

pull mirroring only had one generic error message (URI) is not a valid HTTP Git repository even when the error had nothing to do with validation. That made non-working pull mirroring settings very hard to debug.

This MR aims to give it more accurate error messages:

  • Not a git repository: Invalid response body when the endpoint response is invalid
  • Not a git repository: Invalid content-type when the endpoint content-type is invalid
  • (URI) endpoint error: (HTTP_STATUS) (ERROR_MESSAGE) when the API call is not successful
  • and others with exceptions...

Related to #428649 (closed)

Closes #419642 (closed) #428744 (closed)

Edited by Patrick Cyiza

Merge request reports