]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/server/server-error-code.enum.ts
Fix live ending job that breaks new live session
[github/Chocobozzz/PeerTube.git] / shared / models / server / server-error-code.enum.ts
1 export const enum ServerErrorCode {
2 /**
3 * The simplest form of payload too large: when the file size is over the
4 * global file size limit
5 */
6 MAX_FILE_SIZE_REACHED = 'max_file_size_reached',
7
8 /**
9 * The payload is too large for the user quota set
10 */
11 QUOTA_REACHED = 'quota_reached',
12
13 /**
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.
17 */
18 DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS = 'does_not_respect_follow_constraints',
19
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',
23 /**
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
26 * broadcast one.
27 */
28 MAX_INSTANCE_LIVES_LIMIT_REACHED = 'max_instance_lives_limit_reached',
29 /**
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.
33 */
34 MAX_USER_LIVES_LIMIT_REACHED = 'max_user_lives_limit_reached',
35
36 /**
37 * A torrent should have at most one correct video file. Any more and we will
38 * not be able to choose automatically.
39 */
40 INCORRECT_FILES_IN_TORRENT = 'incorrect_files_in_torrent'
41 }
42
43 /**
44 * oauthjs/oauth2-server error codes
45 * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
46 **/
47 export const enum OAuth2ErrorCode {
48 /**
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
52 * another client.
53 *
54 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-grant-error.js
55 */
56 INVALID_GRANT = 'invalid_grant',
57
58 /**
59 * Client authentication failed (e.g., unknown client, no client authentication
60 * included, or unsupported authentication method).
61 *
62 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-client-error.js
63 */
64 INVALID_CLIENT = 'invalid_client',
65
66 /**
67 * The access token provided is expired, revoked, malformed, or invalid for other reasons
68 *
69 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-token-error.js
70 */
71 INVALID_TOKEN = 'invalid_token',
72 }