chore(errors): always add internal error to echo error
(cherry picked from commit 7a7e97770c9ecc10e805069ae16c2ffa2779d2a5)
This commit is contained in:
@ -45,7 +45,7 @@ func UploadTaskAttachment(c echo.Context) error {
|
||||
|
||||
var taskAttachment models.TaskAttachment
|
||||
if err := c.Bind(&taskAttachment); err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No task ID provided")
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No task ID provided").SetInternal(err)
|
||||
}
|
||||
|
||||
// Rights check
|
||||
@ -125,7 +125,7 @@ func GetTaskAttachment(c echo.Context) error {
|
||||
|
||||
var taskAttachment models.TaskAttachment
|
||||
if err := c.Bind(&taskAttachment); err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No task ID provided")
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No task ID provided").SetInternal(err)
|
||||
}
|
||||
|
||||
// Rights check
|
||||
|
Reference in New Issue
Block a user