jsonapi.rb icon indicating copy to clipboard operation
jsonapi.rb copied to clipboard

Rails 7.1 "config.action_dispatch.show_exceptions" support

Open a3626a opened this issue 8 months ago • 2 comments

Rails 7.1 added new config option ":rescuable" for "config.action_dispatch.show_exceptions" (https://mattbrictson.com/blog/rails-71-features#1-finally-we-can-write-proper-integration-tests-for-errors)

Therefore, we can now delete "Rails.env.test?" condition from here: https://github.com/stas/jsonapi.rb/blob/master/lib/jsonapi/errors.rb#L12-L29

a3626a avatar May 20 '25 15:05 a3626a

I think we'll still need it in order to support older rails versions.

stas avatar May 20 '25 18:05 stas

Why don't you conditionally add "Rails.env.test?" by reading config.action_dispatch.show_exceptions or Rails verison?

a3626a avatar Jun 05 '25 05:06 a3626a