Skip to content

fix(ws): Fix JSON decode error on invalid commands#1202

Merged
msbrogli merged 1 commit intomasterfrom
fix/ws-json-decode-error
Jan 21, 2025
Merged

fix(ws): Fix JSON decode error on invalid commands#1202
msbrogli merged 1 commit intomasterfrom
fix/ws-json-decode-error

Conversation

@msbrogli
Copy link
Member

Motivation

Fix an unhandled exception when a websocket command was malformed.

Acceptance Criteria

  1. Send a WebsocketErrorMessage when a command is malformed.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli requested a review from jansegre as a code owner January 14, 2025 17:06
@msbrogli msbrogli self-assigned this Jan 14, 2025
@msbrogli msbrogli force-pushed the fix/ws-json-decode-error branch from 705e68a to 52aa340 Compare January 14, 2025 17:08
jansegre
jansegre previously approved these changes Jan 14, 2025
@github-actions
Copy link

github-actions bot commented Jan 14, 2025

🐰 Bencher Report

Branchfix/ws-json-decode-error
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.52
(-8.00%)
1.48
(97.82%)
1.81
(83.64%)
🐰 View full continuous benchmarking report in Bencher

glevco
glevco previously approved these changes Jan 14, 2025
@msbrogli msbrogli dismissed stale reviews from glevco and jansegre via 90fddc7 January 14, 2025 17:38
@msbrogli msbrogli force-pushed the fix/ws-json-decode-error branch from 52aa340 to 90fddc7 Compare January 14, 2025 17:38
@codecov
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.02%. Comparing base (508030c) to head (90fddc7).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hathor/websocket/protocol.py 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1202      +/-   ##
==========================================
+ Coverage   84.91%   85.02%   +0.11%     
==========================================
  Files         323      323              
  Lines       25124    25133       +9     
  Branches     3859     3859              
==========================================
+ Hits        21334    21370      +36     
+ Misses       3042     3028      -14     
+ Partials      748      735      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msbrogli msbrogli merged commit 90fddc7 into master Jan 21, 2025
7 of 8 checks passed
@msbrogli msbrogli deleted the fix/ws-json-decode-error branch January 21, 2025 21:11
This was referenced Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants