Better error messages
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
246bc04ea8
commit
5db53cf8ef
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue