-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable allowH2 by default and require Node.js >= 18.20.0 (#734)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Enhanced error handling across various services by introducing a centralized timeout error checking function. - HTTP/2 support enabled in the HTTP client configuration. - **Bug Fixes** - Corrected a typographical error in comments for better clarity. - **Documentation** - Updated Node.js version requirements in the project configuration. - **Tests** - Improved test cases for `NpmChangesStream` and `TaskRepository` to ensure accurate behavior and performance. - **Chores** - Updated Node.js version in CI workflow for more precise testing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
12 changed files
with
77 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const TimeoutErrorNames = [ | ||
'HttpClientRequestTimeoutError', | ||
'HttpClientConnectTimeoutError', | ||
'ConnectionError', | ||
'ConnectTimeoutError', | ||
'BodyTimeoutError', | ||
'ResponseTimeoutError', | ||
]; | ||
|
||
export function isTimeoutError(err: Error) { | ||
if (TimeoutErrorNames.includes(err.name)) { | ||
return true; | ||
} | ||
if (err instanceof AggregateError && err.errors) { | ||
for (const subError of err.errors) { | ||
if (TimeoutErrorNames.includes(subError.name)) { | ||
return true; | ||
} | ||
} | ||
} | ||
if ('cause' in err && err.cause instanceof Error) { | ||
if (TimeoutErrorNames.includes(err.cause.name)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters