This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch rel/0.95.0
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit c2082079d026583cf7b2f5202b9031c720e0beab
Author: Isaak Krut <[email protected]>
AuthorDate: Mon May 20 15:21:08 2024 -0400

    #2661 Added error message when self registration fails (#2873)
    
    * #2661 added error message when self registration fails
    
    * #2661 format fix
    
    * #2661 moved error handling to backend
    
    * #2661 moved error handling to backend
    
    * #2661 license fix
    
    * #2661 updated error handling
---
 .../main/java/org/apache/streampipes/rest/impl/Authentication.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/Authentication.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/Authentication.java
index 78b9aaea3d..bc26edf5ee 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/Authentication.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/Authentication.java
@@ -109,6 +109,10 @@ public class Authentication extends AbstractRestResource {
       throw new SpMessageException(
           HttpStatus.BAD_REQUEST,
           Notifications.error("This email address already exists. Please 
choose another address."));
+    } catch (IllegalArgumentException e) {
+      throw new SpMessageException(
+          HttpStatus.INTERNAL_SERVER_ERROR,
+          Notifications.error("User registration failed. Please report this to 
your admin."));
     }
   }
 

Reply via email to