forked from TrueCloudLab/frostfs-s3-gw
[#325] Log error on failed request id generation
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
f958eef2b3
commit
ee48d1dc85
2 changed files with 5 additions and 3 deletions
|
@ -198,7 +198,10 @@ func Request(log *zap.Logger, settings RequestSettings) Func {
|
||||||
return func(h http.Handler) http.Handler {
|
return func(h http.Handler) http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
// generate random UUIDv4
|
// generate random UUIDv4
|
||||||
id, _ := uuid.NewRandom()
|
id, err := uuid.NewRandom()
|
||||||
|
if err != nil {
|
||||||
|
log.Error(logs.FailedToGenerateRequestID, zap.Error(err))
|
||||||
|
}
|
||||||
|
|
||||||
// set request id into response header
|
// set request id into response header
|
||||||
// also we have to set request id here
|
// also we have to set request id here
|
||||||
|
|
|
@ -141,11 +141,10 @@ const (
|
||||||
CouldntDeleteObjectFromStorageContinueDeleting = "couldn't delete object from storage, continue deleting from tree"
|
CouldntDeleteObjectFromStorageContinueDeleting = "couldn't delete object from storage, continue deleting from tree"
|
||||||
CouldntPutAccessBoxIntoCache = "couldn't put accessbox into cache"
|
CouldntPutAccessBoxIntoCache = "couldn't put accessbox into cache"
|
||||||
InvalidAccessBoxCacheRemovingCheckInterval = "invalid accessbox check removing interval, using default value"
|
InvalidAccessBoxCacheRemovingCheckInterval = "invalid accessbox check removing interval, using default value"
|
||||||
CouldNotParseContainerAPEEnabledAttribute = "could not parse container APE enabled attribute"
|
|
||||||
CouldNotCloseRequestBody = "could not close request body"
|
CouldNotCloseRequestBody = "could not close request body"
|
||||||
BucketOwnerKeyIsMissing = "bucket owner key is missing"
|
BucketOwnerKeyIsMissing = "bucket owner key is missing"
|
||||||
SettingsNodeInvalidOwnerKey = "settings node: invalid owner key"
|
SettingsNodeInvalidOwnerKey = "settings node: invalid owner key"
|
||||||
FailedToSendTransaction = "failed to send transaction"
|
|
||||||
SuccessfulAuth = "successful auth"
|
SuccessfulAuth = "successful auth"
|
||||||
PolicyRequest = "policy request"
|
PolicyRequest = "policy request"
|
||||||
|
FailedToGenerateRequestID = "failed to generate request id"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue