diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-02 18:15:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-02 18:15:41 +0200 |
commit | e030bfb59dd5ee65f20a64686ec9b22ca39f70ae (patch) | |
tree | c9a439159ef540291e3c030bcaf958b953442147 /shared/models/server/peertube-problem-document.model.ts | |
parent | 463206948d6a9d46e7e68d55c7b763e601ecc870 (diff) | |
download | PeerTube-e030bfb59dd5ee65f20a64686ec9b22ca39f70ae.tar.gz PeerTube-e030bfb59dd5ee65f20a64686ec9b22ca39f70ae.tar.zst PeerTube-e030bfb59dd5ee65f20a64686ec9b22ca39f70ae.zip |
Refactor server errors handler
Diffstat (limited to 'shared/models/server/peertube-problem-document.model.ts')
-rw-r--r-- | shared/models/server/peertube-problem-document.model.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/shared/models/server/peertube-problem-document.model.ts b/shared/models/server/peertube-problem-document.model.ts new file mode 100644 index 000000000..5e1c320f3 --- /dev/null +++ b/shared/models/server/peertube-problem-document.model.ts | |||
@@ -0,0 +1,32 @@ | |||
1 | import { HttpStatusCode } from '@shared/core-utils' | ||
2 | import { OAuth2ErrorCode, ServerErrorCode } from './server-error-code.enum' | ||
3 | |||
4 | export interface PeerTubeProblemDocumentData { | ||
5 | 'invalid-params'?: Record<string, Object> | ||
6 | |||
7 | originUrl?: string | ||
8 | |||
9 | keyId?: string | ||
10 | |||
11 | targetUrl?: string | ||
12 | |||
13 | actorUrl?: string | ||
14 | |||
15 | // Feeds | ||
16 | format?: string | ||
17 | url?: string | ||
18 | } | ||
19 | |||
20 | export interface PeerTubeProblemDocument extends PeerTubeProblemDocumentData { | ||
21 | type: string | ||
22 | title: string | ||
23 | |||
24 | detail: string | ||
25 | // Compat PeerTube <= 3.2 | ||
26 | error: string | ||
27 | |||
28 | status: HttpStatusCode | ||
29 | |||
30 | docs?: string | ||
31 | code?: ServerErrorCode | OAuth2ErrorCode | ||
32 | } | ||