You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apps/0_toolbar.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,10 @@ View the [YAML or JSON representation](../core_concepts/13_json_schema_and_parsi
48
48
49
49
Hub Compatible JSON: View the JSON / YAML representation of the app in a format that is compatible with the [Windmill Hub](https://hub.windmill.dev/).
50
50
51
+

52
+
53
+

54
+
51
55
### App Inputs
52
56
53
57
The app inputs menu displays a list of all the inputs of each component. A toggle allows you to display only resources inputs, enabling you to easily configure your third-party resources for an app imported from the Hub, for example:
Copy file name to clipboardExpand all lines: docs/cli_local_dev/1_vscode-extension/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ In the settings menu, set the remote url, workspace name and [token](../../core_
70
70
71
71
1. Install the [extension](https://marketplace.visualstudio.com/items?itemName=windmill-labs.windmill).
72
72
73
-
2. Enter your Windmill remote URL and [token](../../core_concepts/4_webhooks/index.md#user-token), so the extension can execute scripts and flows on your workspace.
73
+
2. Enter your Windmill remote URL and [token](../../core_concepts/4_webhooks/index.mdx#user-token), so the extension can execute scripts and flows on your workspace.
74
74
75
75
3. From any script file, use `> Windmill: Run preview in the current editor` or Ctrl+Enter and Shift+Enter to generate the UI preview (provided that the script meets the [few rules](../../core_concepts/13_json_schema_and_parsing/index.md#json-schema-in-windmill) required by Windmill).
Copy file name to clipboardExpand all lines: docs/core_concepts/10_error_handling/index.mdx
+59-42Lines changed: 59 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -8,40 +8,38 @@ There are 5 ways to do error handling in Windmill.
8
8
9
9
One way to handle errors in Windmill is by using the `try/catch` block within a Script. This method is not specific to Windmill and can be used in any programming language that supports exception handling.
10
10
11
-
Here is an example in TypeScript:
11
+
Here is an example in [TypeScript](../../getting_started/0_scripts_quickstart/1_typescript_quickstart/index.mdx):
12
12
13
13
```ts
14
-
exportasyncfunction main():Promise<void> {
15
-
try {
16
-
// Code that might throw an exception
17
-
const result =awaitfetchData(); // Asynchronous operation that may throw an exception
18
-
console.log('Data:', result); // If no exception occurs, display the data
19
-
} catch (error) {
20
-
// Code to handle the exception
21
-
console.error('An error occurred:', error);
22
-
}
23
-
}
24
-
25
-
asyncfunction fetchData():Promise<string> {
26
-
// Simulating an asynchronous operation that may throw an exception
27
-
returnnewPromise((resolve, reject) => {
28
-
// Intentionally throwing an exception
29
-
setTimeout(() => {
30
-
reject(newError('Failed to fetch data'));
31
-
}, 2000);
32
-
});
14
+
// Define the main function which will handle errors using try/catch
@@ -59,9 +57,22 @@ If defined, the error handler will take as input, the result of the step that er
59
57
/>
60
58
</div>
61
59
60
+
### Special Case: Error Handling in Flows
61
+
62
+
There are other tricks to do Error handling in flows, see:
63
+
64
+
<divclass="grid grid-cols-2 gap-6 mb-4">
65
+
<DocCard
66
+
title="Error Handling in Flows"
67
+
description="There are four ways to handle errors in Windmill flows."
68
+
href="/docs/flows/error_handling"
69
+
/>
70
+
</div>
71
+
72
+
62
73
## Schedules' Error Handlers
63
74
64
-
Add a special script or flow to execute in case of an error in your scheduled script or flow.
75
+
Add a special script or flow to execute in case of an error in your [scheduled](../1_scheduling/index.md) script or flow.
65
76
66
77
You can pick the Slack pre-set schedule error handler or define your own.
67
78
@@ -82,11 +93,29 @@ You can pick the Slack pre-set schedule error handler or define your own.
82
93
83
94
## Workspace Error Handler
84
95
85
-
You can define a script to be executed automatically in case of error in the workspace.
96
+
### Workspace Error Handler on Slack
97
+
98
+
On [Cloud, Self-Host Pro & Enterprise Editions](../../misc/7_plans_details/index.mdx), you can [connect workspace to Slack](../../integrations/slack.mdx) and enable an automated error handler on a given channel.
86
99
87
-
From the workspace settings, pick the "Error Handler" tab and pick a script.
The following args will be passed to the error handler:
92
121
@@ -102,7 +131,7 @@ The Error handler will be executed by the automatically created group g/error_ha
102
131
Here is a template for your workspace error handler:
103
132
104
133
```ts
105
-
//Global / workspace error handler template
134
+
//Workspace error handler template
106
135
107
136
exportasyncfunction main(
108
137
path:string, // The path of the script or flow that errored
@@ -123,7 +152,7 @@ export async function main(
123
152
124
153
## Instance Error Handler
125
154
126
-
You can define a script to be executed automatically in case of error in your instance.
155
+
You can define a script to be executed automatically in case of error in your instance (all workspaces).
127
156
128
157
This Superadmin Error handler is defined by setting the path to the script to be executed as an env variable to all servers using: `GLOBAL_ERROR_HANDLER_PATH_IN_ADMINS_WORKSPACE`.
129
158
@@ -156,16 +185,4 @@ export async function main(
156
185
console.log(error);
157
186
returnerror;
158
187
}
159
-
```
160
-
161
-
## Special Case: Error Handling in Flows
162
-
163
-
For more information on Error handling in flows, see:
164
-
165
-
<divclass="grid grid-cols-2 gap-6 mb-4">
166
-
<DocCard
167
-
title="Error Handling in Flows"
168
-
description="There are four ways to handle errors in Windmill flows."
0 commit comments