Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Connection Error Message Due to Subscription Right Permissions #21

Open
4 tasks done
AlexCatarino opened this issue Dec 6, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working enhancement New feature or request

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

The error message informs us about the security type for which we don't have permission.

Actual Behavior

We get this error:
"Runtime Error: Failed to authenticate websocket. Make sure your API key is valid and has the right permissions."

in the Syslog we see:

2024-12-06T11:57:14.0252444Z TRACE:: PolygonSubscriptionManager.Subscribe(): JPM
2024-12-06T11:57:14.0256851Z TRACE:: WebSocketClientWrapper connection task started: wss://socket.polygon.io/stocks
2024-12-06T11:57:14.0257277Z TRACE:: WebSocketClientWrapper.HandleConnection(wss://socket.polygon.io/stocks): Connecting...
2024-12-06T11:57:14.1161131Z TRACE:: WebSocketClientWrapper.OnOpen(): Connection opened (IsOpen:True, State:Open): wss://socket.polygon.io/stocks
2024-12-06T11:57:14.1161655Z TRACE:: PolygonWebSocketClientWrapper.OnOpen(): Equity - connection open
2024-12-06T11:57:14.1348581Z TRACE:: PolygonSubscriptionManager.ConnectWebSocket(): Failed authentication: Your plan doesn't include websocket access. Visit https://polygon.io/pricing to upgrade..

It would be helpful if the runtime error reports that we don't have permissions for the stocks endpoint, since we may have permissions for the option one.

Potential Solution

Attach the request URL to the message.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@AlexCatarino AlexCatarino added bug Something isn't working enhancement New feature or request labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant