Handle specific error for GetCodespaceToken
This commit is contained in:
parent
86717f14a1
commit
2a0ea1617b
2 changed files with 13 additions and 2 deletions
|
|
@ -135,8 +135,12 @@ func pollForCodespace(ctx context.Context, client apiClient, log logger, duratio
|
|||
log.Print(".")
|
||||
token, err := client.GetCodespaceToken(ctx, user, name)
|
||||
if err != nil {
|
||||
// Do nothing. We expect this to fail until the codespace is provisioned
|
||||
continue
|
||||
if err == api.ErrNotProvisioned {
|
||||
// Do nothing. We expect this to fail until the codespace is provisioned
|
||||
continue
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("failed to get codespace token: %w", err)
|
||||
}
|
||||
|
||||
return client.GetCodespace(ctx, token, user, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue