|
7 | 7 | import EventSummaryRow from '$lib/components/event/event-summary-row.svelte';
|
8 | 8 |
|
9 | 9 | const WORKFLOW_TASK_FAILED_ERROR_COPY = {
|
| 10 | + Unspecified: { |
| 11 | + title: 'Unspecified', |
| 12 | + copy: 'The Workflow Task failed for an unknown reason.', |
| 13 | + contactSupport: true, |
| 14 | + }, |
10 | 15 | UnhandledCommand: {
|
11 | 16 | title: 'Unhandled Command',
|
12 |
| - copy: 'The workflow task has failed because there are new available events since the last workflow task started. A retry workflow task has been scheduled and the workflow will have a chance to handle those new events.', |
| 17 | + copy: 'The Workflow Task failed because there are new available events since the last Workflow Task started. A retry Workflow Task has been scheduled and the Workflow will have a chance to handle those new events.', |
13 | 18 | },
|
14 | 19 | BadScheduleActivityAttributes: {
|
15 | 20 | title: 'Bad Schedule Activity Attributes',
|
| 21 | + copy: 'The Workflow Task failed because of missing or incorrect ScheduleActivity attributes.', |
16 | 22 | },
|
17 | 23 | BadRequestCancelActivityAttributes: {
|
18 | 24 | title: 'Bad Request Cancel Activity Attributes',
|
| 25 | + copy: 'The Workflow Task failed because of bad RequestCancelActivity attributes. An Activity was scheduled to cancel, but the scheduled event id was never set.', |
19 | 26 | },
|
20 | 27 | BadStartTimerAttributes: {
|
21 | 28 | title: 'Bad Start Timer Attributes',
|
| 29 | + copy: 'The Workflow Task failed because the scheduled event is missing a timer id.', |
22 | 30 | },
|
23 | 31 | BadCancelTimerAttributes: {
|
24 | 32 | title: 'Bad Cancel Timer Attributes',
|
| 33 | + copy: 'The Workflow Task failed when trying to cancel a timer due to an unset timer id.', |
25 | 34 | },
|
26 | 35 | BadRecordMarkerAttributes: {
|
27 | 36 | title: 'Bad Record Marker Attributes',
|
| 37 | + copy: 'The Workflow Task failed because of a missing or invalid Marker name.', |
28 | 38 | },
|
29 | 39 | BadCompleteWorkflowExecutionAttributes: {
|
30 | 40 | title: 'Bad Complete Workflow Execution Attributes',
|
| 41 | + copy: 'The Workflow Task failed because of an unset attribute on CompleteWorkflowExecution.', |
31 | 42 | },
|
32 | 43 | BadFailWorkflowExecutionAttribute: {
|
33 | 44 | title: 'Bad Fail Workflow Execution Attributes',
|
| 45 | + copy: 'The Workflow Task failed because of an unset FailWorkflowExecution attribute or failure.', |
34 | 46 | },
|
35 | 47 | BadCancelWorkflowExecutionAttributes: {
|
36 | 48 | title: 'Bad Cancel Workflow Execution Attributes',
|
| 49 | + copy: 'The Workflow Task failed because of an unset attribute on CancelWorkflowExecution.', |
37 | 50 | },
|
38 | 51 | BadRequestCancelExternalAttributes: {
|
39 | 52 | title: 'Bad Request Cancel External Attributes',
|
| 53 | + copy: 'The Workflow Task failed due to an invalid attribute on a request to cancel an external Workflow. Check the Failure Message for more details.', |
40 | 54 | },
|
41 | 55 | BadContinueAsNewAttributes: {
|
42 | 56 | title: 'Bad Continue As New Attributes',
|
| 57 | + copy: 'The Workflow Task failed because it failed to validate on a ContinueAsNew attribute. Check the Failure Message for more details.', |
43 | 58 | },
|
44 | 59 | StartTimerDuplicateId: {
|
45 | 60 | title: 'Start Timer Duplicate',
|
| 61 | + copy: 'The Workflow Task failed because a timer with the given timer id has already started.', |
46 | 62 | },
|
47 | 63 | ResetStickyTaskQueue: {
|
48 | 64 | title: 'Reset Sticky Task Queue',
|
| 65 | + copy: 'The Workflow Task failed because the Sticky Task Queue needs to be reset. The system will automatically retry.', |
49 | 66 | },
|
50 | 67 | WorkflowWorkerUnhandledFailure: {
|
51 | 68 | title: 'Workflow Worker Unhandled Failure',
|
52 |
| - copy: 'The workflow task has failed due to an unhandled failure from the workflow code.', |
| 69 | + copy: 'The Workflow Task failed due to an unhandled failure from the Workflow code.', |
53 | 70 | actionCopy: 'deterministic constraints',
|
54 | 71 | link: 'https://docs.temporal.io/workflows/#deterministic-constraints',
|
55 | 72 | },
|
| 73 | + WorkflowTaskHeartbeatError: { |
| 74 | + title: 'Workflow Task Heartbeat Error', |
| 75 | + copy: 'The Workflow Task failed to send a heartbeat while executing long-running local Activities. These local Activities will re-execute on the next Workflow Task attempt. If this error is persistent, these local Activities will run repeatedly until the Workflow times out.', |
| 76 | + }, |
56 | 77 | BadSignalWorkflowExecutionAttributes: {
|
57 | 78 | title: 'Bad Signal Workflow Execution Attributes',
|
| 79 | + copy: 'The Workflow Task failed to validate attributes for SignalWorkflowExecution. Check the Failure Message for more details.', |
58 | 80 | },
|
59 | 81 | BadStartChildExecutionAttributes: {
|
60 | 82 | title: 'Bad Start Child Execution Attributes',
|
| 83 | + copy: 'The Workflow Task failed to validate attributes needed for StartChildWorkflowExecution. Check the Failure Message for more details.', |
61 | 84 | },
|
62 | 85 | ForceCloseCommand: {
|
63 | 86 | title: 'Force Close Command',
|
64 |
| - copy: 'The workflow task was forced to close by the server. A retry will be scheduled if this is a recoverable error.', |
| 87 | + copy: 'The Workflow Task was forced to close. A retry will be scheduled if the error is recoverable.', |
65 | 88 | },
|
66 | 89 | FailoverCloseCommand: {
|
67 | 90 | title: 'Failover Close Command',
|
68 |
| - copy: 'The workflow task was forced to close due to a namespace failover. A retry will be scheduled automatically.', |
| 91 | + copy: 'The Workflow Task was forced to close due to a Namespace failover. A retry will be scheduled automatically.', |
69 | 92 | },
|
70 | 93 | BadSignalInputSize: {
|
71 | 94 | title: 'Bad Signal Input Size',
|
| 95 | + copy: 'The payload has exceeded the available input size on a Signal.', |
72 | 96 | },
|
73 | 97 | ResetWorkflow: {
|
74 | 98 | title: 'Reset Workflow',
|
| 99 | + copy: 'The system failed this Workflow Task. If a reset for this Workflow was requested check the progress on the new Workflow, otherwise reset this Workflow.', |
75 | 100 | },
|
76 | 101 | BadBinary: {
|
77 | 102 | title: 'Bad Binary',
|
| 103 | + copy: 'The system failed this Workflow Task because the deployment of this Worker is marked as bad binary.', |
78 | 104 | },
|
79 | 105 | ScheduleActivityDuplicatId: {
|
80 | 106 | title: 'Schedule Activity Duplicate ID',
|
81 |
| - copy: 'A duplicate Activity ID is used, please check if you have specified the same ActivityID in your workflow.', |
| 107 | + copy: 'The Workflow Task failed because the Activity ID is already in use, please check if you have specified the same Activity ID in your workflow.', |
82 | 108 | },
|
83 | 109 | BadSearchAttributes: {
|
84 |
| - title: 'Missing Search Attributes', |
85 |
| - copy: 'It looks like you might be missing search attributes, which might cause workflow tasks to continue to retry without success.', |
| 110 | + title: 'Bad Search Attributes', |
| 111 | + copy: 'A Search attribute is either missing or the value exceeds the limit. This might cause Workflow tasks to continue to retry without success.', |
86 | 112 | actionCopy: 'configuring search attributes',
|
87 | 113 | link: 'https://docs.temporal.io/visibility#search-attribute',
|
88 | 114 | },
|
89 | 115 | NonDeterministicError: {
|
90 |
| - title: 'Cause Non Deterministic Error', |
91 |
| - copy: 'The workflow task has failed due to non-deterministic error from workflow code. This usually means the workflow code has a non-backward compatible change without proper versioning branch.', |
| 116 | + title: 'Non Deterministic Error', |
| 117 | + copy: 'A non-deterministic error has caused the Workflow Task to fail. This usually means the workflow code has a non-backward compatible change without a proper versioning branch.', |
| 118 | + }, |
| 119 | + BadModifyWorkflowPropertiesAttributes: { |
| 120 | + title: 'Bad Modify Workflow Properties Attributes', |
| 121 | + copy: 'The Workflow Task failed to validate attributes on ModifyWorkflowProperty on the upsert memo. Check the Failure Message for more details.', |
| 122 | + }, |
| 123 | + PendingChildWorkflowsLimitExceeded: { |
| 124 | + title: 'Pending Child Workflows Limit Exceeded', |
| 125 | + copy: 'The capacity for pending child Workflows has been reached. The Workflow Task was failed to prevent any more child Workflows from being added.', |
| 126 | + }, |
| 127 | + PendingActivitiesLimitExceeded: { |
| 128 | + title: 'Pending Activities Limit Exceeded', |
| 129 | + copy: 'The capacity for pending Activities has been reached. The Workflow Task was failed to prevent another Activity from being created.', |
| 130 | + }, |
| 131 | + PendingSignalsLimitExceeded: { |
| 132 | + title: 'Pending Signals Limit Exceeded', |
| 133 | + copy: 'The capacity for pending Signals to be sent from this Workflow has been reached.', |
| 134 | + }, |
| 135 | + PendingRequestCancelLimitExceeded: { |
| 136 | + title: 'Pending Request Cancel Limit Exceeded', |
| 137 | + copy: 'The capacity for pending requests to cancel other Workflows has been reached.', |
92 | 138 | },
|
93 | 139 | };
|
94 | 140 |
|
| 141 | + function getErrorCause( |
| 142 | + error: WorkflowTaskFailedEvent, |
| 143 | + ): WorkflowTaskFailedCause | 'WorkflowTaskHeartbeatError' { |
| 144 | + if (!error || !error.workflowTaskFailedEventAttributes) { |
| 145 | + return; |
| 146 | + } |
| 147 | +
|
| 148 | + const { |
| 149 | + workflowTaskFailedEventAttributes: { failure, cause }, |
| 150 | + } = error; |
| 151 | +
|
| 152 | + if ( |
| 153 | + failure?.applicationFailureInfo?.type === 'workflowTaskHeartbeatError' |
| 154 | + ) { |
| 155 | + return 'WorkflowTaskHeartbeatError'; |
| 156 | + } |
| 157 | + return cause; |
| 158 | + } |
| 159 | +
|
95 | 160 | export let error: WorkflowTaskFailedEvent;
|
96 | 161 |
|
97 |
| - $: errorCopy = |
98 |
| - WORKFLOW_TASK_FAILED_ERROR_COPY[ |
99 |
| - error?.workflowTaskFailedEventAttributes?.cause |
100 |
| - ] ?? {}; |
101 |
| - $: ({ title = '', copy = '', actionCopy = '', link = '' } = errorCopy); |
| 162 | + $: cause = getErrorCause(error); |
| 163 | + $: errorCopy = WORKFLOW_TASK_FAILED_ERROR_COPY[cause] ?? {}; |
| 164 | + $: ({ |
| 165 | + title = '', |
| 166 | + copy = '', |
| 167 | + actionCopy = '', |
| 168 | + link = '', |
| 169 | + contactSupport = false, |
| 170 | + } = errorCopy); |
102 | 171 | </script>
|
103 | 172 |
|
104 | 173 | {#if !$updating && (title || copy)}
|
105 | 174 | <Alert icon="warning" intent="warning" {title}>
|
106 |
| - <p>{copy}</p> |
| 175 | + <p> |
| 176 | + {copy} |
| 177 | + {#if contactSupport} |
| 178 | + Please <Link newTab href="http://support.temporal.io/" |
| 179 | + >contact support</Link |
| 180 | + >. |
| 181 | + {/if} |
| 182 | + </p> |
107 | 183 | {#if actionCopy && link}
|
108 | 184 | <p>
|
109 | 185 | Learn more about <Link newTab href={link}>{actionCopy}</Link>.
|
|
0 commit comments