Merge pull request #112 from github/jg/start-errs
api start: ignore any 7 err code in start
This commit is contained in:
commit
ab47e97540
1 changed files with 2 additions and 2 deletions
|
|
@ -278,8 +278,8 @@ func (a *API) StartCodespace(ctx context.Context, token string, codespace *Codes
|
|||
if len(b) > 100 {
|
||||
b = append(b[:97], "..."...)
|
||||
}
|
||||
if resp.StatusCode == http.StatusServiceUnavailable && strings.TrimSpace(string(b)) == "7" {
|
||||
// HTTP 503 with error code 7 (EnvironmentNotShutdown) is benign.
|
||||
if strings.TrimSpace(string(b)) == "7" {
|
||||
// Non-HTTP 200 with error code 7 (EnvironmentNotShutdown) is benign.
|
||||
// Ignore it.
|
||||
} else {
|
||||
return fmt.Errorf("failed to start codespace: %s", b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue