mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
78d7f45516
4 changed files with 72 additions and 68 deletions
|
@ -130,10 +130,14 @@ class Epp::DomainsController < EppController
|
|||
|
||||
@domain_transfer = @domain.transfer(params[:parsed_frame], action, current_user)
|
||||
|
||||
if @domain.errors.empty? && @domain_transfer
|
||||
if @domain_transfer
|
||||
render_epp_response '/epp/domains/transfer'
|
||||
else
|
||||
handle_errors(@domain)
|
||||
epp_errors << {
|
||||
code: '2303',
|
||||
msg: I18n.t('no_transfers_found')
|
||||
}
|
||||
handle_errors
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,6 +8,18 @@ class EppController < ApplicationController
|
|||
before_action :latin_only
|
||||
before_action :validate_request
|
||||
before_action :update_epp_session
|
||||
|
||||
around_action :catch_epp_errors
|
||||
def catch_epp_errors
|
||||
err = catch(:epp_error) do
|
||||
yield
|
||||
nil
|
||||
end
|
||||
return unless err
|
||||
@errors = [err]
|
||||
handle_errors
|
||||
end
|
||||
|
||||
helper_method :current_user
|
||||
|
||||
rescue_from StandardError do |e|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue