Improve error handling
Followup for !308 (merged) to improve error handling.
Relates to gitlab-org/gitlab#297658 (closed).
Edited by Mikhail Mazurskiy
Followup for !308 (merged) to improve error handling.
Relates to gitlab-org/gitlab#297658 (closed).