Skip to content

Commit 0a4b706

Browse files
committed
fix(sdk): concurrencyLimit names are 1-122 characters without slashes
1 parent 90f9829 commit 0a4b706

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ export function queue(options: QueueOptions): Queue {
258258
* ```
259259
*/
260260
export function concurrencyLimit(options: ConcurrencyLimitOptions): ConcurrencyLimit {
261+
if (options.name.length === 0 || options.name.length > 122 || options.name.includes("/")) {
262+
throw new Error(
263+
`Concurrency limit "${options.name}": names are 1-122 characters and may not contain "/".`
264+
);
265+
}
266+
261267
resourceCatalog.registerConcurrencyLimitMetadata(options);
262268

263269
// @ts-expect-error

0 commit comments

Comments
 (0)