Commit 8980b714 authored by Simon Knox's avatar Simon Knox Committed by syasonik

Return no_content from prometheus API empty response

parent e53f475e
......@@ -13,7 +13,7 @@ class Projects::Environments::PrometheusApiController < Projects::ApplicationCon
).execute
if result.nil?
return render status: :accepted, json: {
return render status: :no_content, json: {
status: _('processing'),
message: _('Not ready yet. Try again later.')
}
......
......@@ -85,12 +85,12 @@ describe Projects::Environments::PrometheusApiController do
context 'with nil result' do
let(:service_result) { nil }
it 'returns 202 accepted' do
it 'returns 204 no_content' do
get :proxy, params: environment_params
expect(json_response['status']).to eq('processing')
expect(json_response['message']).to eq('Not ready yet. Try again later.')
expect(response).to have_gitlab_http_status(:accepted)
expect(response).to have_gitlab_http_status(:no_content)
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