Skip to content

Fix error message when there are no credits #47

Description

@Gisson

Tried to create a WSG without enough credits and got

│ Error: SingleStore API client returned status code Forbidden
│
│   with singlestoredb_workspace_group.example,
│   on main.tf line 17, in resource "singlestoredb_workspace_group" "example":
│   17: resource "singlestoredb_workspace_group" "example" {
│
│ An unsuccessful status code occurred when calling SingleStore API. Ensure a valid API key is created at https://portal.singlestore.com/organizations/org-id/api-keys and it's provided in one of the following
│ ways:
│ 1. Directly set as the 'api_key' attribute in the provider configuration.
│ 2. Stored in a file with its absolute path set in the 'api_key_path' attribute.
│ 3. Set as the 'SINGLESTOREDB_API_KEY' environment variable.If the error is not clear, please report the issue https://www.singlestore.com/support/.
│
│ SingleStore client response body: error creating workspace group (group): no active plan found for project

This is misleading as there is no problem with the API key but with credit balance. Error message should reflect that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions