Merge pull request #86 from versity/ben/err_log

add internal error log to non-xml response
This commit is contained in:
Ben McClelland
2023-06-13 09:31:26 -07:00
committed by GitHub
+4
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), "", "", ""))
}