feat(server): self-hosted worker (#10085)

This commit is contained in:
DarkSky
2025-02-12 08:01:57 +08:00
committed by GitHub
parent 19f0eb1931
commit 88a3a2d13b
23 changed files with 817 additions and 20 deletions
@@ -247,6 +247,10 @@ export const USER_FRIENDLY_ERRORS = {
type: 'resource_not_found',
message: 'Resource not found.',
},
bad_request: {
type: 'bad_request',
message: 'Bad request.',
},
// Input errors
query_too_long: {
@@ -21,6 +21,12 @@ export class NotFound extends UserFriendlyError {
super('resource_not_found', 'not_found', message);
}
}
export class BadRequest extends UserFriendlyError {
constructor(message?: string) {
super('bad_request', 'bad_request', message);
}
}
@ObjectType()
class QueryTooLongDataType {
@Field() max!: number
@@ -770,6 +776,7 @@ export enum ErrorNames {
INTERNAL_SERVER_ERROR,
TOO_MANY_REQUEST,
NOT_FOUND,
BAD_REQUEST,
QUERY_TOO_LONG,
USER_NOT_FOUND,
USER_AVATAR_NOT_FOUND,