You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging websocket connection errors can be quite difficult in some scenarios and I was wondering whether it would be possible to expose the underlying Upgrade error.
I may be wrong but it does not seem to be possible to retrieve the error returned by the FastHTTP Upgrade function as the middleware always returns a ErrUpgradeRequired error.
Feature Description
Hi everyone,
Debugging websocket connection errors can be quite difficult in some scenarios and I was wondering whether it would be possible to expose the underlying
Upgrade
error.I may be wrong but it does not seem to be possible to retrieve the error returned by the FastHTTP
Upgrade
function as the middleware always returns aErrUpgradeRequired
error.https://github.com/gofiber/contrib/blob/main/websocket/websocket.go#L132
The idea is to add a new
struct
to wrap the original errorUsers can then wrap the middleware with their own error handler
Hopefully my explanation makes sense. I'm happy to submit a pull request if you find this useful.
Thanks for the great work on
fiber
!Additional Context (optional)
No response
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: