Fixed codeclimate issues

This commit is contained in:
Sergei Tsoganov 2023-07-13 12:32:33 +03:00
parent 65ae5adbb8
commit cbe78e505b
3 changed files with 84 additions and 74 deletions

View file

@ -9,8 +9,8 @@ module EppRequestable
authorize! :create, Epp::Server
result = server.request(request_params[:payload])
render_success(data: { xml: result.force_encoding('UTF-8') })
rescue StandardError
handle_non_epp_errors(nil, I18n.t('errors.messages.epp_conn_error'))
rescue StandardError => e
handle_non_epp_errors(nil, e.message.presence || I18n.t('errors.messages.epp_conn_error'))
end
private