diff --git a/pkg/routes/api/v1/testing.go b/pkg/routes/api/v1/testing.go index 5fb04e547..8a8389ce9 100644 --- a/pkg/routes/api/v1/testing.go +++ b/pkg/routes/api/v1/testing.go @@ -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)