Open reinisla opened 2 years ago
Hi guys, I'm experiencing the exact same error, is there any solution for that? Is catching the error the right way to "solve" it?
Also running into this. Its not a huge thing but a slightly more precise temporary solutions is:
user = swallow_warden_throws { env["warden"].user }
def swallow_warden_throws
catch(:warden) do
result = yield
# This might look pointless, but it's not. We only get here if we don't throw, so we need to return early to
# expose the yielded value to the caller as opposed to nil
return result
end
nil
end
This avoids rescuing unrelated throw errors.
Is there any progress here? Would be nice to get this merged...
Just came across this same issue. Thanks to the folks above for at least putting in workarounds.
Same issue as UncaughtThrowError warden #4427
When ApplicationCable Subscription to channel is active and timeout_in is set to x minutes, when the timeout kicks in ApplicationCable will try to stream to channel, trigger find_verified_user and fail with UncaughtThrowError(uncaught throw :warden)
Environment
devise.rb
Current behavior
Default setup for ApplicationCable Connection
If you have an active channel subscription and Devise timeout kicks in
will fail with
To reproduce:
Expected behavior
Does not throw UncaughtThrowError(uncaught throw :warden)
Temporary solution (rescue exception)