Skip to content

Commit

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

Co-authored-by: pareeohnos <adrian@euphoricpanda.co.uk>
Co-authored-by: Adrian Hooper <adrian.hooper@builder.ai>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent 7297511 commit 41a924f
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 41a924f

Please sign in to comment.