forked from TrueCloudLab/frostfs-s3-gw
[#155] Fix error handling
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1ecf32c302
commit
f2eeed0b85
3 changed files with 3 additions and 15 deletions
|
@ -119,7 +119,7 @@ var s3ErrorResponseMap = map[string]string{
|
|||
|
||||
// WriteErrorResponse writes error headers.
|
||||
func WriteErrorResponse(ctx context.Context, w http.ResponseWriter, err error, reqURL *url.URL) {
|
||||
code := http.StatusBadRequest
|
||||
code := http.StatusInternalServerError
|
||||
|
||||
if e, ok := err.(Error); ok {
|
||||
code = e.HTTPStatusCode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue