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
@@ -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)
}
