Improved validation error message

This commit is contained in:
Florian Sylvain
2022-12-20 00:05:29 +01:00
parent 22b25c0a4a
commit d03427d29d
+1 -1
View File
@@ -56,7 +56,7 @@ func AddArticleHandler(c *gin.Context) {
err = pushDocument(articlesLocation, document) err = pushDocument(articlesLocation, document)
if err != nil { if err != nil {
SendBadRequest(c, "Could not insert document into DB.") SendBadRequest(c, fmt.Sprintf(`Could not insert document into DB: %v`, err.Error()))
return return
} }