]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/Verify.java
upd: make verification processes more consistent on failure
[gigi.git] / src / org / cacert / gigi / pages / Verify.java
index d7e5aed6bfe405c22512822755ab108da412c759..2b4cd82605cfe2ffc62fa76b2cde50e489717ad0 100644 (file)
@@ -62,14 +62,14 @@ public class Verify extends Page {
                 try {
                     target.verify(hash);
                 } catch (IllegalArgumentException e) {
-                    throw new GigiApiException("The email address is invalid.");
+                    throw new PermamentFormException(new GigiApiException("Given token could not be found to complete the verification process (Email Ping)."));
                 }
                 return new SuccessMessageResult(new Scope(emailAddressVerified, data));
             } else if ("domain".equals(type)) {
                 try {
                     target.verify(hash);
                 } catch (IllegalArgumentException e) {
-                    throw new GigiApiException("The domain is invalid.");
+                    throw new PermamentFormException(new GigiApiException("Given token could not be found to complete the verification process (Domain Ping)."));
                 }
                 return new SuccessMessageResult(new Scope(domainVerified, data));
             } else {