Skip to content

Commit

Permalink
Change method used to retrieve rack status (#1457)
Browse files Browse the repository at this point in the history
Fixes #1456

Co-authored-by: Adrian Hooper <[email protected]>
  • Loading branch information
2 people authored and bf4 committed Nov 21, 2024
1 parent 7297511 commit 3bbd9d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jsonapi/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3bbd9d8

Please sign in to comment.