Commit a87de0a0 authored by Sean Arnold's avatar Sean Arnold

Update response code to 403

parent 6acc1ff3
...@@ -80,7 +80,7 @@ module API ...@@ -80,7 +80,7 @@ module API
authorize!(:update_alert_management_metric_image, alert) authorize!(:update_alert_management_metric_image, alert)
render_api_error!('Feature not available', 400) unless alert.metric_images_available? render_api_error!('Feature not available', 403) unless alert.metric_images_available?
metric_image = alert.metric_images.find_by_id(params[:metric_image_id]) metric_image = alert.metric_images.find_by_id(params[:metric_image_id])
......
...@@ -335,7 +335,7 @@ RSpec.describe API::AlertManagementAlerts do ...@@ -335,7 +335,7 @@ RSpec.describe API::AlertManagementAlerts do
it 'returns an error' do it 'returns an error' do
subject subject
expect(response).to have_gitlab_http_status(:bad_request) expect(response).to have_gitlab_http_status(:forbidden)
expect(json_response['message']).to eq('Feature not available') expect(json_response['message']).to eq('Feature not available')
end end
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