Closed jonfung-dydx closed 3 weeks ago
The changes in this pull request focus on enhancing error handling in the protocol/streaming/ws/websocket_server.go
file. The modifications include importing the math
package for integer range validation, alongside implementing validation checks in the parseSubaccountIds
and parseClobPairIds
functions. These checks ensure that parsed IDs are within valid integer ranges, returning errors for invalid inputs to improve the robustness of the WebSocket server.
File Path | Change Summary |
---|---|
protocol/streaming/ws/websocket_server.go |
- Imported math package for integer validation. - Added validation checks in parseSubaccountIds and parseClobPairIds functions to ensure IDs are within valid ranges. |
protocol/streaming/ws/websocket_server.go
file in this PR are directly related to the main PR as both involve modifications to the WebSocket server, specifically enhancing the handling of message sizes and improving error handling for subaccount IDs and clob pair IDs.protocol
In the server's heart, a change so bright,
Valid IDs now dance in the light.
With checks in place, no more will stray,
Subaccounts and clobs, safe on their way.
Hopping with joy, we celebrate this feat,
A robust WebSocket, oh what a treat! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
must be
>= 0
and<= math.MaxInt32
Summary by CodeRabbit
New Features
Bug Fixes