diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/request/abstract-request-scheduler.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/request/abstract-request-scheduler.ts b/server/lib/request/abstract-request-scheduler.ts index 08e371a02..f838c47f2 100644 --- a/server/lib/request/abstract-request-scheduler.ts +++ b/server/lib/request/abstract-request-scheduler.ts | |||
@@ -88,8 +88,10 @@ abstract class AbstractRequestScheduler <T> { | |||
88 | // The function fire some useful callbacks | 88 | // The function fire some useful callbacks |
89 | try { | 89 | try { |
90 | const { response } = await makeSecureRequest(params) | 90 | const { response } = await makeSecureRequest(params) |
91 | if (response.statusCode !== 200 && response.statusCode !== 201 && response.statusCode !== 204) { | 91 | |
92 | throw new Error('Status code not 20x : ' + response.statusCode) | 92 | // 400 because if the other pod is not up to date, it may not understand our request |
93 | if ([ 200, 201, 204, 400 ].indexOf(response.statusCode) === -1) { | ||
94 | throw new Error('Status code not 20x or 400 : ' + response.statusCode) | ||
93 | } | 95 | } |
94 | } catch (err) { | 96 | } catch (err) { |
95 | logger.error('Error sending secure request to %s pod.', toPod.host, err) | 97 | logger.error('Error sending secure request to %s pod.', toPod.host, err) |