fix: connection timeout error (#55)
This commit is contained in:
parent
84436e819e
commit
6d112c89c5
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@fal-ai/serverless-client",
|
"name": "@fal-ai/serverless-client",
|
||||||
"description": "The fal serverless JS/TS client",
|
"description": "The fal serverless JS/TS client",
|
||||||
"version": "0.8.5",
|
"version": "0.8.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -520,6 +520,12 @@ export const realtimeImpl: RealtimeClient = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isFalErrorResult(data)) {
|
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();
|
const { onError = noop } = getCallbacks();
|
||||||
onError(
|
onError(
|
||||||
new ApiError({
|
new ApiError({
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
"importHelpers": false,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": false,
|
"checkJs": false,
|
||||||
"types": ["node"]
|
"types": ["node"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user