diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.ts | 2 | ||||
-rw-r--r-- | client/src/app/core/rest/rest-extractor.service.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 0acd44524..8034ccebf 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -431,7 +431,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
431 | .pipe( | 431 | .pipe( |
432 | // If 400, 403 or 404, the video is private or blocked so redirect to 404 | 432 | // If 400, 403 or 404, the video is private or blocked so redirect to 404 |
433 | catchError(err => { | 433 | catchError(err => { |
434 | if (err.body.errorCode === ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS && err.body.originUrl) { | 434 | if (err.body.type === ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS && err.body.originUrl) { |
435 | const search = window.location.search | 435 | const search = window.location.search |
436 | let originUrl = err.body.originUrl | 436 | let originUrl = err.body.originUrl |
437 | if (search) originUrl += search | 437 | if (search) originUrl += search |
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 |