GitLab Migration - an invalid request to start a new migration results in error 500
From https://gitlab.com/gitlab-org/manage/import/discussions/-/issues/30#note_1184728696
An invalid request to start a new migration via API is usually raising an exception and results in a 500 error returned to the user. We should return the actual error back to the user instead.
E.g. if you pass an invalid token - user sees 500 Internal Server Error
but the real error is Unsuccessful response 401 from /api/v4/metadata. Body: {"message"=>"401 Unauthorized"})
Proposed solution
Rescuing BulkImports::NetworkError here should fix the issue.
Edited by Rodrigo Tomonari