Skip to content

Commit 4dbfcff

Browse files
Fix signup rate limit
When rate limited, the nil err is always returned.
1 parent 796da93 commit 4dbfcff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/lib/interaction/nodes/do_create_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (n *NodeDoCreateUser) GetEffects() ([]interaction.Effect, error) {
8686
// check the rate limit only before running the effects
8787
bucket := interaction.SignupPerIPRateLimitBucketSpec(ctx.Config.Authentication, isAnonymous, ip)
8888
reservation = ctx.RateLimiter.Reserve(bucket)
89-
if reservation.Error() != nil {
89+
if err := reservation.Error(); err != nil {
9090
return err
9191
}
9292
}

0 commit comments

Comments
 (0)