From afbddad42fc9aeb48c44fa3fb76b286104ce9d67 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 57136be63..db47570d2 100644 --- a/app/controllers/epp/domains_controller.rb +++ b/app/controllers/epp/domains_controller.rb @@ -68,8 +68,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