Skip to content

Commit

Permalink
Change method used to retrieve rack status
Browse files Browse the repository at this point in the history
Fixes #1456
  • Loading branch information
Adrian Hooper committed Jun 21, 2024
1 parent e92afc6 commit 8244560
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 @@ -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

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

0 comments on commit 8244560

Please sign in to comment.