store: Return an error from DeleteBlueprint and DeleteBlueprintFromWorkspace
If an unknown blueprint or workspace is deleted it will now return an error. Also fixes the blueprints DELETE handlers to return the correct error to the client. Includes a new test.
This commit is contained in:
parent
2675eff4eb
commit
b4710b52f1
3 changed files with 32 additions and 8 deletions
|
|
@ -366,6 +366,7 @@ func TestBlueprintsDelete(t *testing.T) {
|
|||
ExpectedJSON string
|
||||
}{
|
||||
{"DELETE", "/api/v0/blueprints/delete/test", ``, http.StatusOK, `{"status":true}`},
|
||||
{"DELETE", "/api/v0/blueprints/delete/test3-non", ``, http.StatusBadRequest, `{"status":false,"errors":[{"id":"BlueprintsError","msg":"Unknown blueprint: test3-non"}]}`},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue