mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
feat(server): self-hosted worker (#10085)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user