aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-06-01 01:36:53 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-02 16:57:07 +0200
commit76148b27f7501bac061992136852be4303370c8d (patch)
treefc0559253e833c9252fa14ebaec5321d88bfb4e8 /client/src/app/core
parent5ed25fb76e920dac364cb9ef46f14ec4bd372949 (diff)
downloadPeerTube-76148b27f7501bac061992136852be4303370c8d.tar.gz
PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.zst
PeerTube-76148b27f7501bac061992136852be4303370c8d.zip
refactor API errors to standard error format
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/rest/rest-extractor.service.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/app/core/rest/rest-extractor.service.ts b/client/src/app/core/rest/rest-extractor.service.ts
index b8a95cca6..08ab49512 100644
--- a/client/src/app/core/rest/rest-extractor.service.ts
+++ b/client/src/app/core/rest/rest-extractor.service.ts
@@ -41,7 +41,7 @@ export class RestExtractor {
41 41
42 if (err.error instanceof Error) { 42 if (err.error instanceof Error) {
43 // A client-side or network error occurred. Handle it accordingly. 43 // A client-side or network error occurred. Handle it accordingly.
44 errorMessage = err.error.message 44 errorMessage = err.error.detail || err.error.title
45 console.error('An error occurred:', errorMessage) 45 console.error('An error occurred:', errorMessage)
46 } else if (typeof err.error === 'string') { 46 } else if (typeof err.error === 'string') {
47 errorMessage = err.error 47 errorMessage = err.error