-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathcommon.server.ts
More file actions
31 lines (29 loc) · 981 Bytes
/
common.server.ts
File metadata and controls
31 lines (29 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export type ServiceValidationErrorLevel = "error" | "warn" | "info";
export class ServiceValidationError extends Error {
constructor(
message: string,
public status?: number,
public logLevel?: ServiceValidationErrorLevel
) {
super(message);
this.name = "ServiceValidationError";
}
}
/**
* Thrown when a trigger is rejected because the environment's queue is at its
* maximum size. This is identified separately from other validation errors so
* the batch queue worker can short-circuit retries and skip pre-failed run
* creation for this specific overload scenario — see the batch process item
* callback in `runEngineHandlers.server.ts`.
*/
export class QueueSizeLimitExceededError extends ServiceValidationError {
constructor(
message: string,
public maximumSize: number,
status?: number,
logLevel?: ServiceValidationErrorLevel
) {
super(message, status, logLevel);
this.name = "QueueSizeLimitExceededError";
}
}