From 41a924fbcc3cff7f6e4a08f8863d700ed2baeb56 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Wed, 20 Nov 2024 20:58:37 -0600 Subject: [PATCH] Change method used to retrieve rack status (#1457) (#1463) Fixes #1456 Co-authored-by: pareeohnos Co-authored-by: Adrian Hooper --- lib/jsonapi/error.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jsonapi/error.rb b/lib/jsonapi/error.rb index a5d878af8..334ae1ccd 100644 --- a/lib/jsonapi/error.rb +++ b/lib/jsonapi/error.rb @@ -15,7 +15,7 @@ def initialize(options = {}) @source = options[:source] @links = options[:links] - @status = Rack::Utils::SYMBOL_TO_STATUS_CODE[options[:status]].to_s + @status = Rack::Utils.status_code(options[:status]).to_s @meta = options[:meta] end @@ -46,7 +46,7 @@ def update_with_overrides(error_object_overrides) if error_object_overrides[:status] # :nocov: - @status = Rack::Utils::SYMBOL_TO_STATUS_CODE[error_object_overrides[:status]].to_s + @status = Rack::Utils.status_code(error_object_overrides[:status]).to_s # :nocov: end @meta = error_object_overrides[:meta] || @meta