Accept 202 as valid code for /system/scale-function/<function>

Updated gateway to accept 202 as valid response code for
/system/scale-function/<function> along with 200.

Fixes: #faas-netes/245

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
Vivek Singh
2018-07-15 14:52:29 +05:30
committed by Alex Ellis
parent db465b82a4
commit 07f3e8f624

View File

@ -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) err = fmt.Errorf("error scaling HTTP code %d, %s", res.StatusCode, urlPath)
} }