chore(core): do remove timeout for audio transcription job (#12965)
#### PR Dependency Tree * **PR #12965** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved request timeout handling to ensure timeouts are only set when appropriate and provide clearer error messages. * Updated audio transcription submission to wait indefinitely for completion, preventing requests from being aborted due to timeouts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -41,9 +41,12 @@ export class FetchService extends Service {
|
||||
});
|
||||
|
||||
const timeout = init?.timeout ?? 15000;
|
||||
const timeoutId = setTimeout(() => {
|
||||
abortController.abort('timeout');
|
||||
}, timeout);
|
||||
const timeoutId =
|
||||
timeout > 0
|
||||
? setTimeout(() => {
|
||||
abortController.abort(new Error('timeout after ' + timeout + 'ms'));
|
||||
}, timeout)
|
||||
: undefined;
|
||||
|
||||
let res: Response;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user