Skip to content

Commit

Permalink
fix: remove continue inside redis iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed May 27, 2024
1 parent c634d76 commit e631db1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/pkg/db/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func MSetObject(ctx context.Context, values map[string]any) error {
data, err := json.Marshal(value)
if err != nil {
log.Error().Err(err).Msg("Error marshalling object")
continue
return err
}
pairs = append(pairs, key, string(data))
}
Expand All @@ -87,7 +87,7 @@ func MSetObjectWithExp(ctx context.Context, values map[string]any, exp time.Dura
data, jsonMarshalErr := json.Marshal(value)
if jsonMarshalErr != nil {
log.Error().Err(jsonMarshalErr).Msg("Error marshalling object")
continue
return jsonMarshalErr
}
pairs = append(pairs, key, string(data))
}
Expand Down

0 comments on commit e631db1

Please sign in to comment.