]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/server/server-error-code.enum.ts
Speed up plugins loading
[github/Chocobozzz/PeerTube.git] / shared / models / server / server-error-code.enum.ts
CommitLineData
e6abf95e 1export const enum ServerErrorCode {
81628e50
RK
2 /**
3 * Error yielded upon trying to access a video that is not federated, nor can
4 * be. This may be due to: remote videos on instances that are not followed by
5 * yours, and with your instance disallowing unknown instances being accessed.
6 */
7 DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS = 'does_not_respect_follow_constraints',
8
9 /**
10 * Pretty self-explanatory: the set maximum number of simultaneous lives was
11 * reached, and this error is typically there to inform the user trying to
12 * broadcast one.
13 */
14 MAX_INSTANCE_LIVES_LIMIT_REACHED = 'max_instance_lives_limit_reached',
15
16 /**
17 * Pretty self-explanatory: the set maximum number of simultaneous lives FOR
18 * THIS USER was reached, and this error is typically there to inform the user
19 * trying to broadcast one.
20 */
21 MAX_USER_LIVES_LIMIT_REACHED = 'max_user_lives_limit_reached',
22
23 /**
24 * A torrent should have at most one correct video file. Any more and we will
25 * not be able to choose automatically.
26 */
27 INCORRECT_FILES_IN_TORRENT = 'incorrect_files_in_torrent'
28}
29
30/**
31 * oauthjs/oauth2-server error codes
32 * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
33 **/
34export const enum OAuth2ErrorCode {
35 /**
36 * The provided authorization grant (e.g., authorization code, resource owner
37 * credentials) or refresh token is invalid, expired, revoked, does not match
38 * the redirection URI used in the authorization request, or was issued to
39 * another client.
40 *
41 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-grant-error.js
42 */
43 INVALID_GRANT = 'invalid_grant',
44
45 /**
46 * Client authentication failed (e.g., unknown client, no client authentication
47 * included, or unsupported authentication method).
48 *
49 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-client-error.js
50 */
e030bfb5
C
51 INVALID_CLIENT = 'invalid_client',
52
e030bfb5
C
53 /**
54 * The access token provided is expired, revoked, malformed, or invalid for other reasons
55 *
56 * @see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/errors/invalid-token-error.js
57 */
58 INVALID_TOKEN = 'invalid_token',
e6abf95e 59}