Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkg/vaultsprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ func (bp *VaultsProvider) CreateVault(ctx context.Context, params app.CreateVaul
_ = resp.Body.Close()
}()

if resp.StatusCode != http.StatusCreated {
return errors.New("account was not created")
if resp.StatusCode == http.StatusCreated {
return nil
}

return nil
if resp.StatusCode == http.StatusConflict {
return errors.New("vault already exists")
}

return errors.New("failed to create vault")
}

// ListVaults lists all vaults from a given account.
Expand Down