diff --git a/app/controllers/projects/environments/prometheus_api_controller.rb b/app/controllers/projects/environments/prometheus_api_controller.rb
index f8ef23cd83ea2fb558424a953778cb5f1c905327..9c6c6513a78a5e72f153192ed21909119c64ece7 100644
--- a/app/controllers/projects/environments/prometheus_api_controller.rb
+++ b/app/controllers/projects/environments/prometheus_api_controller.rb
@@ -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.')
       }
diff --git a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb
index d232408b775ad8e1a5b3f3a735cda0e1b6f76869..fdef9bc563833a51595e3905ce842e21d78f8ff6 100644
--- a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb
+++ b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb
@@ -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