diff pkg/imports/st.go @ 4180:91cb4a7b1b13

Always try to translate to readable error if import failed
author Tom Gottfried <tom@intevation.de>
date Mon, 05 Aug 2019 18:21:19 +0200
parents a376351d2774
children f9bb06f2dbe3
line wrap: on
line diff
--- a/pkg/imports/st.go	Mon Aug 05 18:14:41 2019 +0200
+++ b/pkg/imports/st.go	Mon Aug 05 18:21:19 2019 +0200
@@ -20,7 +20,6 @@
 	"time"
 
 	"gemma.intevation.de/gemma/pkg/models"
-	"gemma.intevation.de/gemma/pkg/pgxutils"
 )
 
 // Stretch is a Job to create a stretch in the database.
@@ -205,7 +204,7 @@
 		st.Source,
 		st.Tolerance,
 	).Scan(&id); err != nil {
-		return nil, pgxutils.ReadableError{Err: err}
+		return nil, err
 	}
 
 	// store the associated countries.