Commit 3f0579e1 authored by Vasilii Iakliushin's avatar Vasilii Iakliushin

Don't return 500 error for tags in atom format

Sentry error:
https://sentry.gitlab.net/gitlab/gitlabcom/issues/3152896

**Problem**

When Gitaly is unavailable, tags atom requests return a 500 error.

**Solution**

Return 503 (Service unavailable error) instead

Changelog: fixed
parent 63a7d839
......@@ -31,6 +31,7 @@ class Projects::TagsController < Projects::ApplicationController
rescue Gitlab::Git::CommandError => e
@tags = []
@releases = []
@tags_loading_error = e
end
......
......@@ -31,6 +31,7 @@ RSpec.describe Projects::TagsController do
get :index, params: { namespace_id: project.namespace.to_param, project_id: project }, format: format
expect(assigns(:tags)).to eq([])
expect(assigns(:releases)).to eq([])
expect(response).to have_gitlab_http_status(:service_unavailable)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment