fix: connection timeout error (#55)
This commit is contained in:
parent
84436e819e
commit
6d112c89c5
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@fal-ai/serverless-client",
|
||||
"description": "The fal serverless JS/TS client",
|
||||
"version": "0.8.5",
|
||||
"version": "0.8.6",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@ -520,6 +520,12 @@ export const realtimeImpl: RealtimeClient = {
|
||||
return;
|
||||
}
|
||||
if (isFalErrorResult(data)) {
|
||||
if (data.error === 'TIMEOUT') {
|
||||
// Timeout error messages just indicate that the connection hasn't
|
||||
// received an incoming message for a while. We don't need to
|
||||
// handle them as errors.
|
||||
return;
|
||||
}
|
||||
const { onError = noop } = getCallbacks();
|
||||
onError(
|
||||
new ApiError({
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
"inlineSources": true,
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"importHelpers": false,
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
"types": ["node"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user