mirror of
https://github.com/versity/versitygw.git
synced 2026-06-06 11:02:34 +00:00
Merge pull request #1391 from versity/ben/server-err-log
fix: always log internal server error messages to stderr
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"math"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -3924,7 +3925,7 @@ func SendResponse(ctx *fiber.Ctx, err error, l *MetaOpts) error {
|
||||
return ctx.Send(s3err.GetAPIErrorResponse(apierr, "", "", ""))
|
||||
}
|
||||
|
||||
debuglogger.Logf("Internal Error, %v", err)
|
||||
fmt.Fprintf(os.Stderr, "Internal Error, %v\n", err)
|
||||
ctx.Status(http.StatusInternalServerError)
|
||||
return ctx.Send(s3err.GetAPIErrorResponse(
|
||||
s3err.GetAPIError(s3err.ErrInternalError), "", "", ""))
|
||||
@@ -3978,7 +3979,7 @@ func SendXMLResponse(ctx *fiber.Ctx, resp any, err error, l *MetaOpts) error {
|
||||
return ctx.Send(s3err.GetAPIErrorResponse(serr, "", "", ""))
|
||||
}
|
||||
|
||||
debuglogger.Logf("Internal Error, %v", err)
|
||||
fmt.Fprintf(os.Stderr, "Internal Error, %v\n", err)
|
||||
ctx.Status(http.StatusInternalServerError)
|
||||
|
||||
return ctx.Send(s3err.GetAPIErrorResponse(
|
||||
|
||||
Reference in New Issue
Block a user