From 4bc2d54685a985b4c1c449272c5f395cb4c1a037 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 8 Jun 2022 14:30:41 +0530 Subject: [PATCH] DEV: include `time_left` information in rate limiting error messages (#17037) --- 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 6fff04294fa..274730156eb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -192,7 +192,7 @@ class ApplicationController < ActionController::Base e.description, type: :rate_limit, status: 429, - extras: { wait_seconds: retry_time_in_seconds }, + extras: { wait_seconds: retry_time_in_seconds, time_left: e&.time_left }, headers: response_headers ) end