ruby-grape / grape

An opinionated framework for creating REST-like APIs in Ruby.
http://www.ruby-grape.org
MIT License
9.88k stars 1.22k forks source link

Error formatter new argument change not documented #1905

Open Timunas opened 5 years ago

Timunas commented 5 years ago

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.

dblock commented 5 years ago

Appreciate a PR to fix the docs, thanks.

myxoh commented 4 years ago

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?