From 07f3e8f624ba39ed217bfe13da06841a6b262973 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Sun, 15 Jul 2018 14:52:29 +0530 Subject: [PATCH] Accept 202 as valid code for /system/scale-function/ Updated gateway to accept 202 as valid response code for /system/scale-function/ along with 200. Fixes: #faas-netes/245 Signed-off-by: Vivek Singh --- gateway/plugin/external.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/plugin/external.go b/gateway/plugin/external.go index c806e541..5e2b0743 100644 --- a/gateway/plugin/external.go +++ b/gateway/plugin/external.go @@ -140,7 +140,7 @@ func (s ExternalServiceQuery) SetReplicas(serviceName string, count uint64) erro } } - if res.StatusCode != http.StatusOK { + if !(res.StatusCode == http.StatusOK || res.StatusCode == http.StatusAccepted) { err = fmt.Errorf("error scaling HTTP code %d, %s", res.StatusCode, urlPath) }