You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def coerce_value(val)
converter.call(val)
# Some custom types might fail, so it should be treated as an invalid value
rescue StandardError
Types::InvalidValue.new
end
to
def coerce_value(val)
converter.call(val)
# Some custom types might fail, so it should be treated as an invalid value
rescue StandardError => e
Types::InvalidValue.new(e.message)
end
as indeed Integer#empty? does not exists.
Do you think its reasonable to add this for calling Types::InvalidValue initialiser ?
The text was updated successfully, but these errors were encountered:
in method
Grape::Validations::CoerceValidator#coerce_value
we loose the root cause of Exception leading to aTypes::InvalidValue
Consequence is that the
dry-validate
errors is somewhat not very helpfulexample
I got a params validator that read
which was obvious to debug after changing
to
as indeed
Integer#empty?
does not exists.Do you think its reasonable to add this for calling
Types::InvalidValue
initialiser ?The text was updated successfully, but these errors were encountered: