Closed tfausak closed 10 years ago
This is similar to #42.
>> class CustomError < StandardError .. def initialize(message, something_else) .. super(message) .. end .. end => nil >> json = Stoplight::Failure.new(CustomError.new('custom message', 'whatever')).to_json => "{\"error\":\"#<CustomError: custom message>\",\"time\":\"2014-09-12 11:46:56 -0500\"}" >> Stoplight::Failure.from_json(json) ArgumentError: wrong number of arguments (1 for 2)
This is similar to #42.