@kumori/aurora-backend-handler 1.1.63 → 1.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,13 @@ import { eventHelper } from "../backend-handler";
|
|
|
8
8
|
|
|
9
9
|
type Security = string;
|
|
10
10
|
function extractErrorInfo(error: unknown): { code: string; message: string } {
|
|
11
|
+
if ((error as any)?.isTimeout) {
|
|
12
|
+
return {
|
|
13
|
+
code: "timeout",
|
|
14
|
+
message:
|
|
15
|
+
"The request is taking too long, but it does not mean it failed. If you need more help, please contact support.",
|
|
16
|
+
};
|
|
17
|
+
}
|
|
11
18
|
const err = (error as any)?.error;
|
|
12
19
|
return {
|
|
13
20
|
code: err?.code ?? "unknown_error",
|
|
@@ -239,7 +239,9 @@ export const handleResourceEvent = ({
|
|
|
239
239
|
if (existingIndex !== -1) {
|
|
240
240
|
existingResource = tenant.resources[existingIndex];
|
|
241
241
|
publishUpdate = true;
|
|
242
|
-
tenant.resources[existingIndex] =
|
|
242
|
+
tenant.resources[existingIndex] = existingResource.deleting
|
|
243
|
+
? { ...resource, deleting: true }
|
|
244
|
+
: resource;
|
|
243
245
|
} else {
|
|
244
246
|
tenant.resources.push(resource);
|
|
245
247
|
}
|
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -443,7 +443,11 @@ export const makeGlobalWebSocketRequest = async (
|
|
|
443
443
|
new Error(`Request timeout for ${topic}`),
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
|
-
|
|
446
|
+
const timeoutError = Object.assign(
|
|
447
|
+
new Error(`Request timeout for ${topic}`),
|
|
448
|
+
{ isTimeout: true },
|
|
449
|
+
);
|
|
450
|
+
reject(timeoutError);
|
|
447
451
|
}, timeout);
|
|
448
452
|
|
|
449
453
|
const operation: PendingOperation = {
|
|
@@ -1563,7 +1567,6 @@ const handleOperationError = (operation: PendingOperation, error: any) => {
|
|
|
1563
1567
|
} else if (accErrorResult.eventType === "deletionError") {
|
|
1564
1568
|
eventHelper.account.publish.deletionError(originalData);
|
|
1565
1569
|
}
|
|
1566
|
-
eventHelper.notification.publish.creation(accErrorResult.notification);
|
|
1567
1570
|
break;
|
|
1568
1571
|
case "environment":
|
|
1569
1572
|
const envErrorResult = handleEnvironmentOperationError({
|