Introduce new epp error api #2588

This commit is contained in:
Martin Lensment 2015-07-21 14:08:10 +03:00
parent 8ed8687691
commit ea5a2e54fb
2 changed files with 16 additions and 2 deletions

View file

@ -617,8 +617,10 @@ class Epp::Domain < Domain
def reject_transfer(frame, current_user)
pt = pending_transfer
if current_user.registrar != pt.transfer_from
add_epp_error('2304', nil, nil, I18n.t('transfer_can_be_rejected_only_by_current_registrar'))
return false
throw :epp_error, {
msg: I18n.t('transfer_can_be_rejected_only_by_current_registrar'),
code: '2304'
}
end
transaction do