aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/rest
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-14 23:03:43 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-14 23:03:43 +0200
commit315cc0cc1871ab2a6d6c1bb61cf7b9f10511c3a9 (patch)
tree68cb1b103cc073e0c2ad3de651dfe26c6fe03477 /client/src/app/shared/rest
parent3523b64a03d677c2f8df61c121ff4fcb1d9db7f9 (diff)
downloadPeerTube-315cc0cc1871ab2a6d6c1bb61cf7b9f10511c3a9.tar.gz
PeerTube-315cc0cc1871ab2a6d6c1bb61cf7b9f10511c3a9.tar.zst
PeerTube-315cc0cc1871ab2a6d6c1bb61cf7b9f10511c3a9.zip
Add info when server is processing a video at upload
Diffstat (limited to 'client/src/app/shared/rest')
-rw-r--r--client/src/app/shared/rest/rest-extractor.service.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts
index 1f6222da8..62c600d25 100644
--- a/client/src/app/shared/rest/rest-extractor.service.ts
+++ b/client/src/app/shared/rest/rest-extractor.service.ts
@@ -40,15 +40,13 @@ export class RestExtractor {
40 handleError (err: HttpErrorResponse) { 40 handleError (err: HttpErrorResponse) {
41 let errorMessage 41 let errorMessage
42 42
43 console.log(err)
44
45 if (err.error instanceof Error) { 43 if (err.error instanceof Error) {
46 // A client-side or network error occurred. Handle it accordingly. 44 // A client-side or network error occurred. Handle it accordingly.
47 errorMessage = err.error.message 45 errorMessage = err.error.message
48 console.error('An error occurred:', errorMessage) 46 console.error('An error occurred:', errorMessage)
49 } else if (err.status !== undefined) { 47 } else if (err.status !== undefined) {
50 const body = err.error 48 const body = err.error
51 errorMessage = body.error 49 errorMessage = body ? body.error : 'Unknown error.'
52 console.error(`Backend returned code ${err.status}, body was: ${errorMessage}`) 50 console.error(`Backend returned code ${err.status}, body was: ${errorMessage}`)
53 } else { 51 } else {
54 errorMessage = err 52 errorMessage = err