mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
error responses always lower case + duplicate error response fix
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -99,7 +100,7 @@ func WriteError(err error, w http.ResponseWriter) {
|
||||
httpStatus = http.StatusUnauthorized
|
||||
default:
|
||||
}
|
||||
msg = err.Error()
|
||||
msg = strings.ToLower(err.Error())
|
||||
} else {
|
||||
unhandledMSG := fmt.Sprintf("got unhandled error code, error: %s", err.Error())
|
||||
log.Error(unhandledMSG)
|
||||
|
||||
Reference in New Issue
Block a user