aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/requests.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/requests.ts')
-rw-r--r--server/helpers/requests.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts
index 1a3cc1b5b..201a7d7e3 100644
--- a/server/helpers/requests.ts
+++ b/server/helpers/requests.ts
@@ -14,6 +14,7 @@ export interface PeerTubeRequestError extends Error {
14 statusCode?: number 14 statusCode?: number
15 responseBody?: any 15 responseBody?: any
16 responseHeaders?: any 16 responseHeaders?: any
17 requestHeaders?: any
17} 18}
18 19
19type PeerTubeRequestOptions = { 20type PeerTubeRequestOptions = {
@@ -243,5 +244,9 @@ function buildRequestError (error: RequestError) {
243 newError.statusCode = error.response.statusCode 244 newError.statusCode = error.response.statusCode
244 } 245 }
245 246
247 if (error.options) {
248 newError.requestHeaders = error.options.headers
249 }
250
246 return newError 251 return newError
247} 252}