Skip to content

Commit 09a6db6

Browse files
author
Adrian Hooper
committed
Change method used to retrieve rack status
1 parent e92afc6 commit 09a6db6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jsonapi/error.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def initialize(options = {})
1717
@source = options[:source]
1818
@links = options[:links]
1919

20-
@status = Rack::Utils::SYMBOL_TO_STATUS_CODE[options[:status]].to_s
20+
@status = Rack::Utils.status_code(options[:status]).to_s
2121
@meta = options[:meta]
2222
end
2323

@@ -48,7 +48,7 @@ def update_with_overrides(error_object_overrides)
4848

4949
if error_object_overrides[:status]
5050
# :nocov:
51-
@status = Rack::Utils::SYMBOL_TO_STATUS_CODE[error_object_overrides[:status]].to_s
51+
@status = Rack::Utils.status_code(error_object_overrides[:status]).to_s
5252
# :nocov:
5353
end
5454
@meta = error_object_overrides[:meta] || @meta

0 commit comments

Comments
 (0)