Skip to content

Commit 57a96ef

Browse files
committed
fix: Update clear method signature to return Nil and improve error handling
1 parent edc5d92 commit 57a96ef

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/stores/redis_store.cr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ module Session
199199
0_i64
200200
end
201201

202-
def clear
202+
def clear : Nil
203203
with_circuit_breaker do
204204
Retry.with_retry_if(
205205
->(ex : Exception) { Retry.retryable_connection_error?(ex) },
@@ -216,7 +216,6 @@ module Session
216216
# Don't raise on clear failures
217217
rescue ex : Exception
218218
Log.warn { "Unexpected error while clearing sessions: #{ex.message}" }
219-
nil
220219
end
221220

222221
# Health check method for monitoring

0 commit comments

Comments
 (0)