-
Notifications
You must be signed in to change notification settings - Fork 119
Limit workflow execution query length to 15k characters #2840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
51eb130
e6aa1e0
2f71428
2be95aa
ee76a59
304dea9
698f60e
3173c0d
e3ed240
423d6b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,8 @@ type RequestFromAPIOptions = { | |
| signal?: AbortController['signal']; | ||
| }; | ||
|
|
||
| export const MAX_QUERY_LENGTH = 15000; | ||
|
|
||
| export const isTemporalAPIError = (obj: unknown): obj is TemporalAPIError => | ||
| (obj as TemporalAPIError)?.message !== undefined && | ||
| typeof (obj as TemporalAPIError)?.message === 'string'; | ||
|
|
@@ -80,6 +82,11 @@ export const requestFromAPI = async <T>( | |
| ...nextPageToken, | ||
| }); | ||
| } | ||
|
|
||
| const queryString = query.toString(); | ||
| if (queryString.length >= MAX_QUERY_LENGTH) { | ||
| query = new URLSearchParams(queryString.substring(0, MAX_QUERY_LENGTH - 1)); | ||
|
||
| } | ||
| const url = toURL(endpoint, query); | ||
|
|
||
| try { | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.