mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +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
|
@ -3,12 +3,12 @@ module Epp
|
|||
skip_authorization_check
|
||||
|
||||
def error
|
||||
epp_errors << { code: params[:code], msg: params[:msg] }
|
||||
epp_errors.add(:epp_errors, code: params[:code], msg: params[:msg] )
|
||||
render_epp_response '/epp/error'
|
||||
end
|
||||
|
||||
def command_handler
|
||||
epp_errors << { code: '2000', msg: 'Unknown command' }
|
||||
epp_errors.add(:epp_errors, code: '2000', msg: 'Unknown command' )
|
||||
render_epp_response '/epp/error'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue