mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add fallback route
This commit is contained in:
parent
8307cde4ab
commit
2b22ba18f0
3 changed files with 8 additions and 0 deletions
|
@ -3,4 +3,9 @@ class Epp::ErrorsController < EppController
|
||||||
epp_errors << { code: params[:code], msg: params[:msg] }
|
epp_errors << { code: params[:code], msg: params[:msg] }
|
||||||
render_epp_response '/epp/error'
|
render_epp_response '/epp/error'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def not_found
|
||||||
|
epp_errors << { code: 2400, msg: t('could_not_determine_object_type_check_xml_format_and_namespaces') }
|
||||||
|
render_epp_response '/epp/error'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -496,3 +496,4 @@ en:
|
||||||
request_params: 'Request params'
|
request_params: 'Request params'
|
||||||
repp_log: 'REPP log'
|
repp_log: 'REPP log'
|
||||||
repp_logs: 'REPP logs'
|
repp_logs: 'REPP logs'
|
||||||
|
could_not_determine_object_type_check_xml_format_and_namespaces: 'Could not determine object type. Check XML format and namespaces.'
|
||||||
|
|
|
@ -32,6 +32,8 @@ Rails.application.routes.draw do
|
||||||
post 'command/poll', to: 'polls#poll', constraints: EppConstraint.new(:poll)
|
post 'command/poll', to: 'polls#poll', constraints: EppConstraint.new(:poll)
|
||||||
post 'command/keyrelay', to: 'keyrelays#keyrelay', constraints: EppConstraint.new(:keyrelay)
|
post 'command/keyrelay', to: 'keyrelays#keyrelay', constraints: EppConstraint.new(:keyrelay)
|
||||||
|
|
||||||
|
post 'command/:command', to: 'errors#not_found' # fallback route
|
||||||
|
|
||||||
get 'error/:command', to: 'errors#error'
|
get 'error/:command', to: 'errors#error'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue