Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX Sugestion: Only show API Key Error Message for API auth errors (401 http code) #26

Open
FranciscoMSM opened this issue Feb 9, 2024 · 0 comments

Comments

@FranciscoMSM
Copy link

FranciscoMSM commented Feb 9, 2024

While creating a workspace/workspace group with a name bigger than 32 characters I got this error message:

on sdb_workspaces.tf line 9, in resource "singlestoredb_workspace" "ws0":
  9: resource "singlestoredb_workspace" "ws0" {
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: name: the length must be between 1 and 32

My suggestion is that we only show the API Key Error Message if the API responds with 401 (error in authorization) but omit it for other HTTP code (usually 422 if the error is input validation - like the max length for the name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant