Skip to content

Commit

Permalink
fix: response codes for project and tenant creation
Browse files Browse the repository at this point in the history
  • Loading branch information
henryde committed Nov 15, 2024
1 parent 9af427d commit 8b77e6b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.5.4
## v0.5.5

fix: http response code for building block creation is now 201
FIXES:
- HTTP response code for tenant creation is now 201.
- HTTP response code for project creation is now 201.

## v0.5.4

FIXES:
- HTTP response code for building block creation is now 201.
2 changes: 1 addition & 1 deletion client/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (c *MeshStackProviderClient) CreateProject(project *MeshProjectCreate) (*Me
return nil, err
}

if res.StatusCode != 200 {
if res.StatusCode != 201 {
return nil, fmt.Errorf("unexpected status code: %d, %s", res.StatusCode, data)
}

Expand Down
2 changes: 1 addition & 1 deletion client/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (c *MeshStackProviderClient) CreateTenant(tenant *MeshTenantCreate) (*MeshT
return nil, err
}

if res.StatusCode != 200 {
if res.StatusCode != 201 {
return nil, fmt.Errorf("unexpected status code: %d, %s", res.StatusCode, data)
}

Expand Down

0 comments on commit 8b77e6b

Please sign in to comment.