Skip to content

Commit 39ce2cb

Browse files
authored
Add NexusHandlerFailureInfo (#486)
**Why?** To better capture when Nexus handlers return `HandlerError`s.
1 parent 13e49f9 commit 39ce2cb

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

openapi/openapiv2.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6212,6 +6212,9 @@
62126212
},
62136213
"nexusOperationExecutionFailureInfo": {
62146214
"$ref": "#/definitions/v1NexusOperationFailureInfo"
6215+
},
6216+
"nexusHandlerFailureInfo": {
6217+
"$ref": "#/definitions/v1NexusHandlerFailureInfo"
62156218
}
62166219
}
62176220
},
@@ -8934,6 +8937,15 @@
89348937
},
89358938
"description": "NewWorkflowExecutionInfo is a shared message that encapsulates all the\nrequired arguments to starting a workflow in different contexts."
89368939
},
8940+
"v1NexusHandlerFailureInfo": {
8941+
"type": "object",
8942+
"properties": {
8943+
"type": {
8944+
"type": "string",
8945+
"description": "The Nexus error type as defined in the spec:\nhttps://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors."
8946+
}
8947+
}
8948+
},
89378949
"v1NexusOperationCancelRequestedEventAttributes": {
89388950
"type": "object",
89398951
"properties": {

openapi/openapiv3.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5740,6 +5740,8 @@ components:
57405740
$ref: '#/components/schemas/ChildWorkflowExecutionFailureInfo'
57415741
nexusOperationExecutionFailureInfo:
57425742
$ref: '#/components/schemas/NexusOperationFailureInfo'
5743+
nexusHandlerFailureInfo:
5744+
$ref: '#/components/schemas/NexusHandlerFailureInfo'
57435745
GetClusterInfoResponse:
57445746
type: object
57455747
properties:
@@ -6546,6 +6548,14 @@ components:
65466548
description: |-
65476549
NewWorkflowExecutionInfo is a shared message that encapsulates all the
65486550
required arguments to starting a workflow in different contexts.
6551+
NexusHandlerFailureInfo:
6552+
type: object
6553+
properties:
6554+
type:
6555+
type: string
6556+
description: |-
6557+
The Nexus error type as defined in the spec:
6558+
https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors.
65496559
NexusOperationCancelRequestedEventAttributes:
65506560
type: object
65516561
properties:

temporal/api/failure/v1/message.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ message NexusOperationFailureInfo {
9898
string operation_id = 5;
9999
}
100100

101+
message NexusHandlerFailureInfo {
102+
// The Nexus error type as defined in the spec:
103+
// https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors.
104+
string type = 1;
105+
}
106+
101107
message Failure {
102108
string message = 1;
103109
// The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK
@@ -131,6 +137,7 @@ message Failure {
131137
ActivityFailureInfo activity_failure_info = 11;
132138
ChildWorkflowExecutionFailureInfo child_workflow_execution_failure_info = 12;
133139
NexusOperationFailureInfo nexus_operation_execution_failure_info = 13;
140+
NexusHandlerFailureInfo nexus_handler_failure_info = 14;
134141
}
135142
}
136143

0 commit comments

Comments
 (0)