@superdurable/dex 1.17.0 → 1.20.0
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.
- package/README.md +3 -0
- package/dist/src/errors.d.ts +21 -0
- package/dist/src/errors.js +21 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/gen/dex.d.ts +2 -0
- package/dist/src/gen/dex.js +2 -0
- package/dist/src/gen/dex.js.map +1 -1
- package/dist/src/grpc-status.js +5 -1
- package/dist/src/grpc-status.js.map +1 -1
- package/dist/src/sdk-version.generated.d.ts +1 -1
- package/dist/src/sdk-version.generated.js +1 -1
- package/native/windows-x86_64/dex_blob_cache_node.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -637,6 +637,9 @@ reads (`describeFlow`, `waitForFlow`, and `timeTravel`) use
|
|
|
637
637
|
`FlowNotActiveOrNotFoundError`. Start conflicts, worker failures, RPC lock contention,
|
|
638
638
|
and long-poll timeouts use `FlowAlreadyStartedError`,
|
|
639
639
|
`WorkerInvocationError`, `RpcLockConflictError`, and `LongPollTimeoutError`.
|
|
640
|
+
An update-class request rejected during Flow close cleanup uses
|
|
641
|
+
`FlowClosingError` with sub-status `FLOW_CLOSING`. Re-read the retained terminal
|
|
642
|
+
Flow state before deciding whether another action is needed.
|
|
640
643
|
|
|
641
644
|
RPCs also use this error when the target Flow cannot be found, including query-only
|
|
642
645
|
reads. A query-only RPC without locks, transactional execution, durable effects, or
|
package/dist/src/errors.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare const ErrorSubStatus: Readonly<{
|
|
|
18
18
|
readonly CHANNEL_MESSAGE_NOT_FOUND: "channelMessageNotFound";
|
|
19
19
|
/** A caller-defined request budget expired. */
|
|
20
20
|
readonly REQUEST_TIMEOUT: "requestTimeout";
|
|
21
|
+
/** Dex rejected an update-class request during Flow close cleanup. */
|
|
22
|
+
readonly FLOW_CLOSING: "flowClosing";
|
|
21
23
|
}>;
|
|
22
24
|
/** Represents a value from {@link ErrorSubStatus}. */
|
|
23
25
|
export type ErrorSubStatus = (typeof ErrorSubStatus)[keyof typeof ErrorSubStatus];
|
|
@@ -59,6 +61,25 @@ export declare class DexServiceError extends Error {
|
|
|
59
61
|
/** Indicates that `startFlow` conflicts with an existing Flow ID. */
|
|
60
62
|
export declare class FlowAlreadyStartedError extends DexServiceError {
|
|
61
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Reports a request rejected while Dex closes a Flow.
|
|
66
|
+
* Re-read the retained terminal Flow state before deciding what to do next.
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const options = { requestTimeoutMs: timeoutMs };
|
|
70
|
+
* try {
|
|
71
|
+
* await client.waitForStepCompletion(flowId, stepExecutionId, options);
|
|
72
|
+
* } catch (error) {
|
|
73
|
+
* if (error instanceof FlowClosingError) {
|
|
74
|
+
* await client.waitForFlow(flowId);
|
|
75
|
+
* } else {
|
|
76
|
+
* throw error;
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare class FlowClosingError extends DexServiceError {
|
|
82
|
+
}
|
|
62
83
|
/** Indicates that an operation targeted a Flow ID that does not exist. */
|
|
63
84
|
export declare class FlowNotFoundError extends DexServiceError {
|
|
64
85
|
}
|
package/dist/src/errors.js
CHANGED
|
@@ -24,6 +24,8 @@ export const ErrorSubStatus = Object.freeze({
|
|
|
24
24
|
CHANNEL_MESSAGE_NOT_FOUND: "channelMessageNotFound",
|
|
25
25
|
/** A caller-defined request budget expired. */
|
|
26
26
|
REQUEST_TIMEOUT: "requestTimeout",
|
|
27
|
+
/** Dex rejected an update-class request during Flow close cleanup. */
|
|
28
|
+
FLOW_CLOSING: "flowClosing",
|
|
27
29
|
});
|
|
28
30
|
/** Provides terminal Flow failure categories returned by Dex. */
|
|
29
31
|
export const FlowErrorType = Object.freeze({
|
|
@@ -69,6 +71,25 @@ export class DexServiceError extends Error {
|
|
|
69
71
|
/** Indicates that `startFlow` conflicts with an existing Flow ID. */
|
|
70
72
|
export class FlowAlreadyStartedError extends DexServiceError {
|
|
71
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Reports a request rejected while Dex closes a Flow.
|
|
76
|
+
* Re-read the retained terminal Flow state before deciding what to do next.
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const options = { requestTimeoutMs: timeoutMs };
|
|
80
|
+
* try {
|
|
81
|
+
* await client.waitForStepCompletion(flowId, stepExecutionId, options);
|
|
82
|
+
* } catch (error) {
|
|
83
|
+
* if (error instanceof FlowClosingError) {
|
|
84
|
+
* await client.waitForFlow(flowId);
|
|
85
|
+
* } else {
|
|
86
|
+
* throw error;
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export class FlowClosingError extends DexServiceError {
|
|
92
|
+
}
|
|
72
93
|
/** Indicates that an operation targeted a Flow ID that does not exist. */
|
|
73
94
|
export class FlowNotFoundError extends DexServiceError {
|
|
74
95
|
}
|
package/dist/src/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,EAAE;AACF,kDAAkD;AAClD,mEAAmE;AACnE,+CAA+C;AAC/C,EAAE;AACF,0DAA0D;AAK1D,mFAAmF;AACnF,MAAM,OAAO,wBAAyB,SAAQ,KAAK;CAAG;AAEtD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,oDAAoD;IACpD,aAAa,EAAE,eAAe;IAC9B,2DAA2D;IAC3D,oBAAoB,EAAE,oBAAoB;IAC1C,2CAA2C;IAC3C,eAAe,EAAE,eAAe;IAChC,qDAAqD;IACrD,gBAAgB,EAAE,gBAAgB;IAClC,mEAAmE;IACnE,iBAAiB,EAAE,iBAAiB;IACpC,q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AC;IAC9B,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,OAAO,IAAI,wBAAwB,CAAC,GAAG,SAAS,2BAA2B,CAAC,CAAC;AAC/E,CAAC"}
|
package/dist/src/gen/dex.d.ts
CHANGED
|
@@ -195,6 +195,8 @@ export declare enum ErrorSubStatus {
|
|
|
195
195
|
ERROR_SUB_STATUS_LONG_POLL_TIME_OUT = 5,
|
|
196
196
|
ERROR_SUB_STATUS_CHANNEL_MESSAGE_NOT_FOUND = 6,
|
|
197
197
|
ERROR_SUB_STATUS_REQUEST_TIMEOUT = 7,
|
|
198
|
+
/** ERROR_SUB_STATUS_FLOW_CLOSING - An update-class request arrived while Flow close cleanup is in progress. */
|
|
199
|
+
ERROR_SUB_STATUS_FLOW_CLOSING = 8,
|
|
198
200
|
UNRECOGNIZED = -1
|
|
199
201
|
}
|
|
200
202
|
export declare enum CloseDecisionType {
|
package/dist/src/gen/dex.js
CHANGED
|
@@ -221,6 +221,8 @@ export var ErrorSubStatus;
|
|
|
221
221
|
ErrorSubStatus[ErrorSubStatus["ERROR_SUB_STATUS_LONG_POLL_TIME_OUT"] = 5] = "ERROR_SUB_STATUS_LONG_POLL_TIME_OUT";
|
|
222
222
|
ErrorSubStatus[ErrorSubStatus["ERROR_SUB_STATUS_CHANNEL_MESSAGE_NOT_FOUND"] = 6] = "ERROR_SUB_STATUS_CHANNEL_MESSAGE_NOT_FOUND";
|
|
223
223
|
ErrorSubStatus[ErrorSubStatus["ERROR_SUB_STATUS_REQUEST_TIMEOUT"] = 7] = "ERROR_SUB_STATUS_REQUEST_TIMEOUT";
|
|
224
|
+
/** ERROR_SUB_STATUS_FLOW_CLOSING - An update-class request arrived while Flow close cleanup is in progress. */
|
|
225
|
+
ErrorSubStatus[ErrorSubStatus["ERROR_SUB_STATUS_FLOW_CLOSING"] = 8] = "ERROR_SUB_STATUS_FLOW_CLOSING";
|
|
224
226
|
ErrorSubStatus[ErrorSubStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
225
227
|
})(ErrorSubStatus || (ErrorSubStatus = {}));
|
|
226
228
|
export var CloseDecisionType;
|