more log.Error -> fmt.Errorf cleanup

This commit is contained in:
Kristoffer Dalby 2024-04-12 15:57:43 +02:00 committed by Juan Font
parent 1704977e76
commit 60f0cf908c
10 changed files with 25 additions and 145 deletions

View file

@ -372,10 +372,7 @@ func (m *Mapper) marshalMapResponse(
jsonBody, err := json.Marshal(resp)
if err != nil {
log.Error().
Caller().
Err(err).
Msg("Cannot marshal map response")
return nil, fmt.Errorf("marshalling map response: %w", err)
}
if debugDumpMapResponsePath != "" {
@ -402,10 +399,7 @@ func (m *Mapper) marshalMapResponse(
body, err := json.MarshalIndent(data, "", " ")
if err != nil {
log.Error().
Caller().
Err(err).
Msg("Cannot marshal map response")
return nil, fmt.Errorf("marshalling map response: %w", err)
}
perms := fs.FileMode(debugMapResponsePerm)