From 42a11b7fc1694ad58fd04787a3cfb66e20104775 Mon Sep 17 00:00:00 2001 From: pareeohnos Date: Thu, 14 Nov 2024 18:16:17 +0000 Subject: [PATCH] Change method used to retrieve rack status (#1457) Fixes #1456 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 12d65f58..158a9379 100644 --- a/lib/jsonapi/error.rb +++ b/lib/jsonapi/error.rb @@ -17,7 +17,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 @@ -48,7 +48,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