diff pkg/controllers/user.go @ 4059:07d853f9bf47

Return comprehensible error message in case of duplicate user name
author Tom Gottfried <tom@intevation.de>
date Thu, 25 Jul 2019 09:15:53 +0200
parents 92812bf2f008
children 6c760abcff0e
line wrap: on
line diff
--- a/pkg/controllers/user.go	Thu Jul 25 09:12:53 2019 +0200
+++ b/pkg/controllers/user.go	Thu Jul 25 09:15:53 2019 +0200
@@ -27,6 +27,7 @@
 	"github.com/gorilla/mux"
 
 	"gemma.intevation.de/gemma/pkg/auth"
+	"gemma.intevation.de/gemma/pkg/common"
 	"gemma.intevation.de/gemma/pkg/misc"
 	"gemma.intevation.de/gemma/pkg/models"
 	"gemma.intevation.de/gemma/pkg/scheduler"
@@ -262,6 +263,7 @@
 	}
 
 	if err != nil {
+		err = common.HandlePGError(err)
 		return
 	}