grape icon indicating copy to clipboard operation
grape copied to clipboard

Error formatter new argument change not documented

Open Timunas opened this issue 6 years ago • 2 comments

Custom error formatter must have now 5 arguments instead of the old 4. These changes were introduced here on #1652

When migrating from 0.19 to 1.1.0 I had issues on a custom error formatter because the original_exception argument was introduced but that change was not documented on the upgrading guide.

Timunas avatar Sep 10 '19 16:09 Timunas

Appreciate a PR to fix the docs, thanks.

dblock avatar Sep 11 '19 14:09 dblock

Given that we have this in the docs:

class Twitter::API < Grape::API
  error_formatter :txt, ->(message, backtrace, options, env, original_exception) {
    "error: #{message} from #{backtrace}"
  }
end

Would you say that is not enough?

myxoh avatar Oct 30 '19 12:10 myxoh