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
> DataStax Langflow doesn't make file upload available, you will receive a 501 Not Implemented error.
160
161
162
+
### Aborting requests
163
+
164
+
You can use the standard [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to cancel requests by passing a `signal` to the `run` or `uploadFile` functions. The functions will reject with a `DOMException` error with the name `AbortError` or, if you use [`AbortSignal.timeout`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static), `TimeoutError`.
165
+
166
+
For example, when running the following code, if the entire request takes longer than 500ms, then the promise will reject and the error message will be, "The operation was aborted due to timeout".
167
+
168
+
```js
169
+
constsignal=AbortSignal.timeout(500);
170
+
try {
171
+
constresponse=awaitclient.flow(flowId).run(input, { signal });
172
+
} catch (error) {
173
+
console.error(error.message);
174
+
}
175
+
```
176
+
161
177
## Contributing
162
178
163
179
To run and contribute to this library you can clone the repository:
0 commit comments