aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-28 15:15:44 +0100
committerChocobozzz <me@florianbigard.com>2022-12-28 15:15:44 +0100
commitd522369bed42b0eb951fce403373602c4ec447da (patch)
treead65f546b654f6cd1e9c18e5ff063375ad232084 /client/src/app
parentded68a97600d70fb8bbadfbddac87eadb1233910 (diff)
downloadPeerTube-d522369bed42b0eb951fce403373602c4ec447da.tar.gz
PeerTube-d522369bed42b0eb951fce403373602c4ec447da.tar.zst
PeerTube-d522369bed42b0eb951fce403373602c4ec447da.zip
Prevent sending log error to server on 404
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/core/rest/rest-extractor.service.ts6
1 files changed, 5 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 de3f2bfff..daed7f178 100644
--- a/client/src/app/core/rest/rest-extractor.service.ts
+++ b/client/src/app/core/rest/rest-extractor.service.ts
@@ -87,7 +87,11 @@ export class RestExtractor {
87 87
88 if (err.status !== undefined) { 88 if (err.status !== undefined) {
89 const errorMessage = this.buildServerErrorMessage(err) 89 const errorMessage = this.buildServerErrorMessage(err)
90 logger.error(`Backend returned code ${err.status}, errorMessage is: ${errorMessage}`) 90
91 const message = `Backend returned code ${err.status}, errorMessage is: ${errorMessage}`
92
93 if (err.status === HttpStatusCode.NOT_FOUND_404) logger.clientError(message)
94 else logger.error(message)
91 95
92 return errorMessage 96 return errorMessage
93 } 97 }