Catch server errors like Client can not be authenticated, got HTTP status 401
See original GitHub issueHi,
I am using laravel-echo-server with laravel-echo, I would like to know if it is possible to catch server events like :
Client can not be authenticated, got HTTP status 401
I need to reconnect the user in case of his token has expired. Thanks for reply
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Client can not be authenticated, got HTTP status 401 - Laracasts
Client can not be authenticated, got HTTP status 401. Hello,. I keep getting this error when i'm trying to use private channels (with...
Read more >401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error is triggered by unauthenticated requests made to a WordPress web server. Learn how to identify and fix the issue....
Read more >How to Quickly Fix the 401 Unauthorized Error (5 Methods)
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the ...
Read more >Laravel Echo Client cannot be authenticated - Stack Overflow
When I fire my event, then I get the event in the console, but the user cannot be authenticated for some reason and...
Read more >401 Unauthorized - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i had the same issue. i looked into the code and found that when fail to authenticate or authorized, laravel echo server emit subscription_error event
https://github.com/tlaverdure/laravel-echo-server/blob/b6838d8dc6fa053fa45dbdb5bb6d973bdbf15a23/src/channels/channel.ts#L107
then i listen on event to catch that error
P/s: sorry for my bad english
Seems like this is a laravel-echo-server specific request which can best be documented on the docs for laravel-echo-server.