mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
Use errors as first-class objects
This commit is contained in:
parent
72c865e656
commit
d4775ba5c5
8 changed files with 146 additions and 186 deletions
|
@ -43,11 +43,11 @@ module Epp
|
|||
@notification = current_user.unread_notifications.find_by(id: params[:parsed_frame].css('poll').first['msgID'])
|
||||
|
||||
unless @notification
|
||||
epp_errors << {
|
||||
code: '2303',
|
||||
msg: I18n.t('message_was_not_found'),
|
||||
value: { obj: 'msgID', val: params[:parsed_frame].css('poll').first['msgID'] }
|
||||
}
|
||||
epp_errors.add(:epp_errors,
|
||||
code: '2303',
|
||||
msg: I18n.t('message_was_not_found'),
|
||||
value: { obj: 'msgID',
|
||||
val: params[:parsed_frame].css('poll').first['msgID'] })
|
||||
handle_errors and return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue