Fix error message and JSON keys
This commit is contained in:
parent
454b3489aa
commit
ddbf8590e8
1 changed files with 4 additions and 4 deletions
|
|
@ -574,8 +574,8 @@ func (a *API) GetCodespacePreFlight(ctx context.Context, nwo string) (*User, err
|
|||
|
||||
if resp.StatusCode == http.StatusNotFound {
|
||||
return nil, nil
|
||||
} else if resp.StatusCode != http.StatusForbidden {
|
||||
return nil, fmt.Errorf("codespaces cannot be created from that repository")
|
||||
} else if resp.StatusCode == http.StatusForbidden {
|
||||
return nil, fmt.Errorf("you cannot create codespaces with that repository")
|
||||
} else if resp.StatusCode != http.StatusOK {
|
||||
return nil, api.HandleHTTPError(resp)
|
||||
}
|
||||
|
|
@ -586,9 +586,9 @@ func (a *API) GetCodespacePreFlight(ctx context.Context, nwo string) (*User, err
|
|||
}
|
||||
|
||||
var response struct {
|
||||
BillableOwner User `json:"billableOwner"`
|
||||
BillableOwner User `json:"billable_owner"`
|
||||
Defaults struct {
|
||||
DevcontainerPath string `json:"devcontainerPath"`
|
||||
DevcontainerPath string `json:"devcontainer_path"`
|
||||
Location string `json:"location"`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue