-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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(core): Handle websocket connection error more gracefully in task runners #11635
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
@@ -88,6 +88,18 @@ export abstract class TaskRunner { | |||
}, | |||
maxPayload: opts.maxPayloadSize, | |||
}); | |||
|
|||
this.ws.addEventListener('error', (error) => { | |||
if (error.message?.includes('ECONNREFUSED') || error.message?.includes('ENOTFOUND')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could check error.code
instead of using message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error has no code
it seems: https://share.cleanshot.com/23B8xxCy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, sorry, I meant error.error.code
. And maybe rename error
to event
so it's event.error
instead of error.error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
n8n Run #7799
Run Properties:
|
Project |
n8n
|
Branch Review |
cat-318
|
Run status |
Passed #7799
|
Run duration | 04m 23s |
Commit |
85e9c72aca: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
|
Committer | Iván Ovejero |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
2
|
Skipped |
0
|
Passing |
466
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
https://linear.app/n8n/issue/CAT-318