Skip to content

Commit a90d558

Browse files
author
Marieke GUEYE
committed
add back message key in order to have error_codes
1 parent 0331563 commit a90d558

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/grape/exceptions/validation.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Validation < Grape::Exceptions::Base
99
def initialize(args = {})
1010
fail 'Params are missing:' unless args.key? :params
1111
@params = args[:params]
12+
@message_key = args[:message] if args.key?(:message) && args[:message].is_a?(Symbol)
1213
args[:message] = translate_message(args[:message]) if args.key? :message
1314
super
1415
end

0 commit comments

Comments
 (0)