global
def self.coerce(input)
public contract that users can still `throw :error, hash` from their
Normalize heterogeneous inputs into an ErrorResponse. Preserves the
def self.coerce(input) case input when ErrorResponse input when Grape::Exceptions::Base from_exception(input) when Hash new(**input.slice(:status, :message, :headers, :backtrace, :original_exception)) else new end end