1 export const enum ServerErrorCode {
3 * The simplest form of payload too large: when the file size is over the
4 * global file size limit
6 MAX_FILE_SIZE_REACHED = 'max_file_size_reached',
9 * The payload is too large for the user quota set
11 QUOTA_REACHED = 'quota_reached',
14 * Error yielded upon trying to access a video that is not federated, nor can
15 * be. This may be due to: remote videos on instances that are not followed by
16 * yours, and with your instance disallowing unknown instances being accessed.
18 DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS = 'does_not_respect_follow_constraints',
20 LIVE_NOT_ENABLED = 'live_not_enabled',
21 LIVE_NOT_ALLOWING_REPLAY = 'live_not_allowing_replay',
22 LIVE_CONFLICTING_PERMANENT_AND_SAVE_REPLAY = 'live_conflicting_permanent_and_save_replay',
24 * Pretty self-explanatory: the set maximum number of simultaneous lives was
25 * reached, and this error is typically there to inform the user trying to
28 MAX_INSTANCE_LIVES_LIMIT_REACHED = 'max_instance_lives_limit_reached',
30 * Pretty self-explanatory: the set maximum number of simultaneous lives FOR
31 * THIS USER was reached, and this error is typically there to inform the user
32 * trying to broadcast one.
34 MAX_USER_LIVES_LIMIT_REACHED = 'max_user_lives_limit_reached',
37 * A torrent should have at most one correct video file. Any more and we will
38 * not be able to choose automatically.
40 INCORRECT_FILES_IN_TORRENT = 'incorrect_files_in_torrent'
44 * oauthjs/oauth2-server error codes
45 * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
47 export const enum OAuth2ErrorCode {
49 * The provided authorization grant (e.g., authorization code, resource owner
50 * credentials) or refresh token is invalid, expired, revoked, does not match
51 * the redirection URI used in the authorization request, or was issued to
54 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-grant-error.js
56 INVALID_GRANT = 'invalid_grant',
59 * Client authentication failed (e.g., unknown client, no client authentication
60 * included, or unsupported authentication method).
62 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-client-error.js
64 INVALID_CLIENT = 'invalid_client',
67 * The access token provided is expired, revoked, malformed, or invalid for other reasons
69 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-token-error.js
71 INVALID_TOKEN = 'invalid_token',