@shapediver/sdk.geometry-api-sdk-v2
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -22,3 +22,5 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
while (true) { | ||
const retryLimit = 5; | ||
let retryCounter = 0; | ||
while (retryCounter < retryLimit) { | ||
try { | ||
@@ -28,2 +30,3 @@ return yield call(); | ||
catch (e) { | ||
retryCounter++; | ||
if (e instanceof sdk_geometry_api_sdk_core_1.ShapeDiverResponseError) { | ||
@@ -37,2 +40,6 @@ /* Check for special response statuses */ | ||
} | ||
else if (e.status === 502) { | ||
yield sleep(1000); // 1 second | ||
continue; | ||
} | ||
// Error mapping | ||
@@ -47,2 +54,3 @@ throw new ShapeDiverErrors_1.ShapeDiverResponseError(e); | ||
} | ||
throw new sdk_geometry_api_sdk_core_1.ShapeDiverError("Could not send request: Retry-limit reached"); | ||
}); | ||
@@ -49,0 +57,0 @@ } |
{ | ||
"name": "@shapediver/sdk.geometry-api-sdk-v2", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "SDK to communicate with the Geometry View API version 2", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"jest": "^27.4.7", | ||
"jest": "^27.5.1", | ||
"lerna": "3.22.1", | ||
@@ -53,8 +53,8 @@ "typescript": "^4.5.5", | ||
"webpack-cli": "^4.9.2", | ||
"webpack-dev-server": "^4.7.3" | ||
"webpack-dev-server": "^4.7.4" | ||
}, | ||
"dependencies": { | ||
"@shapediver/sdk.geometry-api-sdk-core": "^1.0.8", | ||
"@shapediver/api.geometry-api-dto-v2": "^1.1.6" | ||
"@shapediver/sdk.geometry-api-sdk-core": "^1.0.9", | ||
"@shapediver/api.geometry-api-dto-v2": "^1.1.7" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
105429
1512