Better error messages
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2020-11-28 22:55:53 +01:00
parent 246bc04ea8
commit 5db53cf8ef
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ func HandleTesting(c echo.Context) error {
content := []map[string]interface{}{}
err := json.Unmarshal(buf.Bytes(), &content)
if err != nil {
return c.JSON(http.StatusInternalServerError, err)
return c.JSON(http.StatusInternalServerError, map[string]interface{}{
"error": true,
"message": err.Error(),
})
}
err = db.RestoreAndTruncate(table, content)