Improved validation error message
This commit is contained in:
1 parent
22b25c0a4a
commit
d03427d29d
1 file changed
+1
-1
@@ -56,7 +56,7 @@ func AddArticleHandler(c *gin.Context) {
|
||||
|
||||
err = pushDocument(articlesLocation, document)
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user