We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde326b commit 59a53f4Copy full SHA for 59a53f4
actionpack/lib/action_controller/metal/exceptions.rb
@@ -5,7 +5,9 @@ class ActionControllerError < StandardError #:nodoc:
5
class BadRequest < ActionControllerError #:nodoc:
6
attr_reader :original_exception
7
8
- def initialize(type, e)
+ def initialize(type = nil, e = nil)
9
+ return super() unless type && e
10
+
11
super("Invalid #{type} parameters: #{e.message}")
12
@original_exception = e
13
set_backtrace e.backtrace
0 commit comments