Skip to content

Commit

Permalink
fix: Add begin/rescue for resolving stickiness in flexible rollout
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre committed Dec 10, 2021
1 parent 3abfee7 commit 652d67c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/unleash/strategy/flexible_rollout.rb
Expand Up @@ -43,7 +43,11 @@ def resolve_stickiness(stickiness, context)
when 'default'
context.user_id || context.session_id || random
else
context.get_by_name(stickiness)
begin
context.get_by_name(stickiness)
rescue KeyError
nil
end
end
end
end
Expand Down

0 comments on commit 652d67c

Please sign in to comment.