Skip to content

Commit

Permalink
fix: log correct http status (#2757)
Browse files Browse the repository at this point in the history
  • Loading branch information
clD11 authored Feb 5, 2025
1 parent 55bdcdb commit 8759cbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/skus/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func getOrderCredsByID(svc *Service, legacyMode bool) handlers.AppHandler {
if legacyMode {
suCreds, ok := creds.([]OrderCreds)
if !ok {
l.Err(errTypeAssertion).Str("orderID", orderID.String()).Str("itemID", itemIDv.String()).Int("status", status).Msg("error getting credentials type assertion")
l.Err(errTypeAssertion).Str("orderID", orderID.String()).Str("itemID", itemIDv.String()).Int("status", http.StatusInternalServerError).Msg("error getting credentials type assertion")
return handlers.WrapError(err, "Error getting credentials", http.StatusInternalServerError)
}

Expand All @@ -837,7 +837,7 @@ func getOrderCredsByID(svc *Service, legacyMode bool) handlers.AppHandler {
}
}

l.Err(errNotFound).Str("orderID", orderID.String()).Str("itemID", itemIDv.String()).Int("status", status).Msg("error finding creds legacy")
l.Err(errNotFound).Str("orderID", orderID.String()).Str("itemID", itemIDv.String()).Int("status", http.StatusNotFound).Msg("error finding creds legacy")

return handlers.WrapError(err, "Error getting credentials", http.StatusNotFound)
}
Expand Down

0 comments on commit 8759cbf

Please sign in to comment.