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

fix(websocket): handle invalid WS conns gracefully #3049

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

ThatOneBro
Copy link
Member

Fixes #3048

@ThatOneBro ThatOneBro requested a review from a team as a code owner October 16, 2023 18:28
@vercel
Copy link

vercel bot commented Oct 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
medplum-storybook ⬜️ Ignored (Inspect) Oct 16, 2023 6:28pm
medplum-www ⬜️ Ignored (Inspect) Oct 16, 2023 6:28pm

@ThatOneBro ThatOneBro self-assigned this Oct 16, 2023
@ThatOneBro ThatOneBro added the subscriptions Features and fixes related to subscriptions label Oct 16, 2023
@sweep-ai
Copy link
Contributor

sweep-ai bot commented Oct 16, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@ThatOneBro ThatOneBro added this to the November 1, 2023 milestone Oct 16, 2023
@coveralls
Copy link

Coverage Status

coverage: 93.859%. remained the same when pulling 909f62b on derrick-fix-hang-on-invalid-ws into 326d2bc on main.

@sonarcloud
Copy link

sonarcloud bot commented Oct 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@codyebberson codyebberson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

I was surprised that you had to drop down to socket.write(), but that appears to be the recommended solution.

👍 ship it

@ThatOneBro ThatOneBro added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit 25fb7d6 Oct 16, 2023
14 checks passed
@ThatOneBro ThatOneBro deleted the derrick-fix-hang-on-invalid-ws branch October 16, 2023 19:05
codyebberson added a commit that referenced this pull request Oct 19, 2023
Add documentation about resource profiles (#3068)
Use helper function for stringifying OutcomeError message (#3082)
Fixes #3077 - correct valueCoding in QuestionnaireForm (#3079)
Add expression (path) to OutcomeError message display (#3078)
Fixed Typo and Grammer  (#3076)
fix(tesh.sh): add shebang for `test.sh` (#3075)
Add MedicationRequest and README Changes (#3064)
fix(build): put placeholder env vars in build step (#3070)
fix(client/auth): respect `accessToken` in constructor (#3066)
Fixes #3069 - docs import warning (#3072)
Added 'Diagnoses' and 'Billing' to Health Gorilla order form (#3062)
Updating document to 2023 version (#3067)
Updating test plan in relation to #2794 (#3061)
Fixes #3027 - added re operator for _filter (#3060)
Fixes #3057 - set Location header on create (#3059)
Updates to SOAP Note and tasks (#3053)
fix: update location of `QuestionnaireForm.stories.tsx` (#3056)
Update README.md (#3058)
Added DangerJS (#3043)
Reorganize auth docs (#3029)
Add valueset for allergies (#3052)
Fixes #3047 - fix _filter ne operator (#3054)
Fixes #3050 - project admins reading project-scoped users (#3051)
Fixed Typo and Grammar  (#3042)
fix(websocket): handle invalid WS conns gracefully (#3049)
Fixes #3045 - expose require in VM context bots (#3046)
Fixes #2942 - handle observation cycles in DiagnosticReportDisplay (#3044)
Fix react fast refresh warnings (#3041)
Fixes #389 - rename validate to validateResource (#3039)
Dependency upgrades (#3040)
github-merge-queue bot pushed a commit that referenced this pull request Oct 19, 2023
Add documentation about resource profiles (#3068)
Use helper function for stringifying OutcomeError message (#3082)
Fixes #3077 - correct valueCoding in QuestionnaireForm (#3079)
Add expression (path) to OutcomeError message display (#3078)
Fixed Typo and Grammer  (#3076)
fix(tesh.sh): add shebang for `test.sh` (#3075)
Add MedicationRequest and README Changes (#3064)
fix(build): put placeholder env vars in build step (#3070)
fix(client/auth): respect `accessToken` in constructor (#3066)
Fixes #3069 - docs import warning (#3072)
Added 'Diagnoses' and 'Billing' to Health Gorilla order form (#3062)
Updating document to 2023 version (#3067)
Updating test plan in relation to #2794 (#3061)
Fixes #3027 - added re operator for _filter (#3060)
Fixes #3057 - set Location header on create (#3059)
Updates to SOAP Note and tasks (#3053)
fix: update location of `QuestionnaireForm.stories.tsx` (#3056)
Update README.md (#3058)
Added DangerJS (#3043)
Reorganize auth docs (#3029)
Add valueset for allergies (#3052)
Fixes #3047 - fix _filter ne operator (#3054)
Fixes #3050 - project admins reading project-scoped users (#3051)
Fixed Typo and Grammar  (#3042)
fix(websocket): handle invalid WS conns gracefully (#3049)
Fixes #3045 - expose require in VM context bots (#3046)
Fixes #2942 - handle observation cycles in DiagnosticReportDisplay (#3044)
Fix react fast refresh warnings (#3041)
Fixes #389 - rename validate to validateResource (#3039)
Dependency upgrades (#3040)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subscriptions Features and fixes related to subscriptions
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Handle connections to invalid WebSocket routes gracefully
3 participants