aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/request
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-07 18:26:12 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-07 18:26:12 +0200
commitad0997adfb9e1e3b1ff54338d7558cf7b18440ea (patch)
tree78ef53699d260e194bbcda7eccb645a14070679a /server/lib/request
parent709756b8e183f67ef9bf8f7bc149af4736260350 (diff)
downloadPeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.gz
PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.zst
PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.zip
Fix error logging
Diffstat (limited to 'server/lib/request')
-rw-r--r--server/lib/request/abstract-request-scheduler.ts4
-rw-r--r--server/lib/request/request-scheduler.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/request/abstract-request-scheduler.ts b/server/lib/request/abstract-request-scheduler.ts
index 128fc5b28..0a9ff65d5 100644
--- a/server/lib/request/abstract-request-scheduler.ts
+++ b/server/lib/request/abstract-request-scheduler.ts
@@ -84,7 +84,7 @@ abstract class AbstractRequestScheduler <T> {
84 } 84 }
85 }) 85 })
86 .catch(err => { 86 .catch(err => {
87 logger.error('Error sending secure request to %s pod.', toPod.host, { error: err }) 87 logger.error('Error sending secure request to %s pod.', toPod.host, err)
88 88
89 throw err 89 throw err
90 }) 90 })
@@ -124,7 +124,7 @@ abstract class AbstractRequestScheduler <T> {
124 }) 124 })
125 .catch(err => { 125 .catch(err => {
126 badPods.push(requestToMake.toPod.id) 126 badPods.push(requestToMake.toPod.id)
127 logger.info('Cannot make request to %s.', toPod.host, { error: err }) 127 logger.info('Cannot make request to %s.', toPod.host, err)
128 }) 128 })
129 }, { concurrency: REQUESTS_IN_PARALLEL }).then(() => ({ goodPods, badPods })) 129 }, { concurrency: REQUESTS_IN_PARALLEL }).then(() => ({ goodPods, badPods }))
130 }) 130 })
diff --git a/server/lib/request/request-scheduler.ts b/server/lib/request/request-scheduler.ts
index 8927d53bb..3945ace20 100644
--- a/server/lib/request/request-scheduler.ts
+++ b/server/lib/request/request-scheduler.ts
@@ -87,7 +87,7 @@ class RequestScheduler extends AbstractRequestScheduler<RequestsGrouped> {
87 afterRequestsHook () { 87 afterRequestsHook () {
88 // Flush requests with no pod 88 // Flush requests with no pod
89 this.getRequestModel().removeWithEmptyTo() 89 this.getRequestModel().removeWithEmptyTo()
90 .catch(err => logger.error('Error when removing requests with no pods.', { error: err })) 90 .catch(err => logger.error('Error when removing requests with no pods.', err))
91 } 91 }
92} 92}
93 93