diff options
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/server/server-error-code.enum.ts | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/shared/models/server/server-error-code.enum.ts b/shared/models/server/server-error-code.enum.ts index f9fe47830..93b9ce20d 100644 --- a/shared/models/server/server-error-code.enum.ts +++ b/shared/models/server/server-error-code.enum.ts | |||
@@ -1,6 +1,52 @@ | |||
1 | export const enum ServerErrorCode { | 1 | export const enum ServerErrorCode { |
2 | DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS = 'DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS', | 2 | /** |
3 | MAX_INSTANCE_LIVES_LIMIT_REACHED = 'MAX_INSTANCE_LIVES_LIMIT_REACHED', | 3 | * Error yielded upon trying to access a video that is not federated, nor can |
4 | MAX_USER_LIVES_LIMIT_REACHED = 'MAX_USER_LIVES_LIMIT_REACHED', | 4 | * be. This may be due to: remote videos on instances that are not followed by |
5 | INCORRECT_FILES_IN_TORRENT = 'INCORRECT_FILES_IN_TORRENT' | 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 | **/ | ||
34 | export 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 | */ | ||
51 | INVALID_CLIENT = 'invalid_client' | ||
6 | } | 52 | } |