aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/server/peertube-problem-document.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-02 18:15:41 +0200
committerChocobozzz <me@florianbigard.com>2021-06-02 18:15:41 +0200
commite030bfb59dd5ee65f20a64686ec9b22ca39f70ae (patch)
treec9a439159ef540291e3c030bcaf958b953442147 /shared/models/server/peertube-problem-document.model.ts
parent463206948d6a9d46e7e68d55c7b763e601ecc870 (diff)
downloadPeerTube-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.ts32
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 @@
1import { HttpStatusCode } from '@shared/core-utils'
2import { OAuth2ErrorCode, ServerErrorCode } from './server-error-code.enum'
3
4export 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
20export 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}