From 08114e722b52238a86ef5719ba233781f7e19d1b Mon Sep 17 00:00:00 2001 From: Matt Farnsworth Date: Tue, 17 Nov 2015 17:48:28 +0200 Subject: [PATCH] Story #104525314 - avoid reporting no errors when error raised --- app/controllers/epp/domains_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/epp/domains_controller.rb b/app/controllers/epp/domains_controller.rb index 8426c8ccb..33a602aed 100644 --- a/app/controllers/epp/domains_controller.rb +++ b/app/controllers/epp/domains_controller.rb @@ -64,8 +64,12 @@ class Epp::DomainsController < EppController else handle_errors(@domain) end - rescue - handle_errors(@domain) + rescue => e + if @domain.errors.any? + handle_errors(@domain) + else + throw e + end end end