Skip to content

Commit 5c65cfd

Browse files
committed
ignore any 7 err code in start
1 parent 881e6d5 commit 5c65cfd

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)