Class: CompleteAsyncError
activity.CompleteAsyncError
Throw this error from an Activity in order to make the Worker forget about this Activity.
The Activity can then be completed asynchronously (from anywhereβusually outside the Worker) using Client.activity.
Example
import { CompleteAsyncError } from '@temporalio/activity';
export async function myActivity(): Promise<never> {
// ...
throw new CompleteAsyncError();
}
Hierarchyβ
-
Error
β³
CompleteAsyncError
Constructorsβ
constructorβ
β’ new CompleteAsyncError(message?
): CompleteAsyncError
Parametersβ
Name | Type |
---|---|
message? | string |
Returnsβ
Inherited fromβ
Error.constructor
Propertiesβ
messageβ
β’ message: string
Inherited fromβ
Error.message
nameβ
β’ name: string
Inherited fromβ
Error.name
stackβ
β’ Optional
stack: string
Inherited fromβ
Error.stack
prepareStackTraceβ
βͺ Static
Optional
prepareStackTrace: (err
: Error
, stackTraces
: CallSite
[]) => any
Optional override for formatting stack traces
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Type declarationβ
βΈ (err
, stackTraces
): any
Optional override for formatting stack traces
Parametersβ
Name | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returnsβ
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited fromβ
Error.prepareStackTrace
stackTraceLimitβ
βͺ Static
stackTraceLimit: number
Inherited fromβ
Error.stackTraceLimit
Methodsβ
captureStackTraceβ
βΈ captureStackTrace(targetObject
, constructorOpt?
): void
Create .stack property on a target object
Parametersβ
Name | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returnsβ
void
Inherited fromβ
Error.captureStackTrace