Skip to content

Commit 5b8137d

Browse files
authored
Merge pull request #1692 from milap-neupane/update-readme-custom-error-formatter
Include original_exception in Readme for custom error formatter
2 parents 401899f + ef77092 commit 5b8137d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ Custom error formatters for existing and additional types can be defined with a
20832083

20842084
```ruby
20852085
class Twitter::API < Grape::API
2086-
error_formatter :txt, ->(message, backtrace, options, env) {
2086+
error_formatter :txt, ->(message, backtrace, options, env, original_exception) {
20872087
"error: #{message} from #{backtrace}"
20882088
}
20892089
end
@@ -2093,7 +2093,7 @@ You can also use a module or class.
20932093

20942094
```ruby
20952095
module CustomFormatter
2096-
def self.call(message, backtrace, options, env)
2096+
def self.call(message, backtrace, options, env, original_exception)
20972097
{ message: message, backtrace: backtrace }
20982098
end
20992099
end

0 commit comments

Comments
 (0)