Skip to main content

Interface: TemporalCancelOperationContext

nexus.TemporalCancelOperationContext

Context received by a TemporalOperationHandler's cancel handler when a Nexus Operation is canceled.

Nexus support in Temporal SDK is experimental.

Hierarchy

  • CancelOperationContext

    TemporalCancelOperationContext

Properties

abortSignal

Readonly abortSignal: AbortSignal

An AbortSignal that is signaled when the current request is canceled, e.g. because the request timed out or the client disconnected.

The framework will cancel the abort controller with an unspecified error type. The handler must rethrow the error object to confirm cancelation. The handler may ignore cancelation and return a result anyway, but there is no guarantee that the client will still be waiting for the result of that request.

Note that cancelation of the current request is not the same thing - and does not relate with - cancelation of the operation itself, which is notified by calling the OperationHandler.cancel method.

Inherited from

nexus.CancelOperationContext.abortSignal


headers

Readonly headers: Record<string, string>

Request header fields.

Inherited from

nexus.CancelOperationContext.headers


operation

Readonly operation: string

Name of the operation.

Inherited from

nexus.CancelOperationContext.operation


requestDeadline

Optional Readonly requestDeadline: Date

Get the deadline for the operation handler method.

Note that this is the time by which the current request should complete, not the operation's deadline.

Inherited from

nexus.CancelOperationContext.requestDeadline


service

Readonly service: string

Name of the service that contains the operation.

Inherited from

nexus.CancelOperationContext.service