From a30cdfd4d4fdde3245174210b9f7c0a0be7bc122 Mon Sep 17 00:00:00 2001 From: zunda Date: Mon, 26 Feb 2024 12:43:07 -1000 Subject: [PATCH] Specify 410 for code when responding as json while self-destruction (#29420) --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5f8725f6fc7..a046ea19c97 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -178,7 +178,7 @@ class ApplicationController < ActionController::Base respond_to do |format| format.any { render 'errors/self_destruct', layout: 'auth', status: 410, formats: [:html] } - format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[410] }, status: code } + format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[410] }, status: 410 } end end