X Tutup
Skip to content

Commit ab47e97

Browse files
authored
Merge pull request cli#112 from github/jg/start-errs
api start: ignore any 7 err code in start
2 parents 881e6d5 + 090af22 commit ab47e97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ func (a *API) StartCodespace(ctx context.Context, token string, codespace *Codes
278278
if len(b) > 100 {
279279
b = append(b[:97], "..."...)
280280
}
281-
if resp.StatusCode == http.StatusServiceUnavailable && strings.TrimSpace(string(b)) == "7" {
282-
// HTTP 503 with error code 7 (EnvironmentNotShutdown) is benign.
281+
if strings.TrimSpace(string(b)) == "7" {
282+
// Non-HTTP 200 with error code 7 (EnvironmentNotShutdown) is benign.
283283
// Ignore it.
284284
} else {
285285
return fmt.Errorf("failed to start codespace: %s", b)

0 commit comments

Comments
 (0)
X Tutup