add internal error log to non-xml response

This commit is contained in:
Ben McClelland
2023-06-13 09:11:44 -07:00
parent 78545d9205
commit 32efd670e1

View File

@@ -424,6 +424,10 @@ func SendResponse(ctx *fiber.Ctx, err error) error {
ctx.Status(serr.HTTPStatusCode)
return ctx.Send(s3err.GetAPIErrorResponse(serr, "", "", ""))
}
fmt.Fprintf(os.Stderr, "Internal Error, req:\n%v\nerr:\n%v\n",
ctx.Request(), err)
return ctx.Send(s3err.GetAPIErrorResponse(
s3err.GetAPIError(s3err.ErrInternalError), "", "", ""))
}