Skip to content

Commit

Permalink
Add nil check alongside redis nil
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb committed Feb 22, 2024
1 parent f54c3d8 commit 4dbaf5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/execution/cancellation/redis.go
Expand Up @@ -73,7 +73,7 @@ func (r redisReadWriter) DeleteCancellation(ctx context.Context, c cqrs.Cancella
key := r.key(c.WorkspaceID, c.FunctionID)
cmd := r.r.B().Hdel().Key(key).Field(c.ID.String()).Build()
err := r.r.Do(ctx, cmd).Error()
if rueidis.IsRedisNil(err) {
if err == nil || rueidis.IsRedisNil(err) {
return nil
}
return fmt.Errorf("error deleting cancellation: %w", err)
Expand Down

0 comments on commit 4dbaf5c

Please sign in to comment.