Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

[UX] - Adding details to errors #28

Closed
jshcmpbll opened this issue Dec 15, 2021 · 2 comments
Closed

[UX] - Adding details to errors #28

jshcmpbll opened this issue Dec 15, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@jshcmpbll
Copy link

I know right now there is the 403 for having the wrong API (lack of access to the EA program for terraform) but I also had and issue with the following error:

Error: 402 Payment Required

I wasn't given the proper context to the issue until I ran my apply with debug finding the following:

2021-12-15T14:21:51.690-0800 [INFO]  Starting apply for module.confluentcloud_kafka_dev.confluentcloud_environment.default
2021-12-15T14:21:51.690-0800 [DEBUG] module.confluentcloud_kafka_dev.confluentcloud_environment.default: applying the planned Create change
2021-12-15T14:21:52.018-0800 [INFO]  provider.terraform-provider-confluentcloud_0.2.0: 2021/12/15 14:21:52 [ERROR] Environment create failed &{<nil> <nil> <nil> <nil> 0xc000174b30}, &{402 Payment Required 402 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range] Access-Control-Allow-Methods:[GET,POST,OPTIONS,PUT,DELETE,PATCH] Connection:[keep-alive] Content-Length:[232] Content-Type:[application/json] Date:[Wed, 15 Dec 2021 22:21:51 GMT] Server:[nginx] Strict-Transport-Security:[max-age=31536000; includeSubDomains; preload] X-Content-Type-Options:[nosniff] X-Frame-Options:[deny] X-Request-Id:[******************************] X-Xss-Protection:[1; mode=block]] {{
  "errors": [
    {
      "id": "**********************",
      "status": "402",
      "code": "quota_exceeded",
      "detail": "Your organization is currently limited to 50 environments",
      "source": {}
    }
  ]
}} 232 [] false false map[] *************************}, 402 Payment Required: timestamp=2021-12-15T14:21:52.018-0800

If possible, I think it would be helpful to provide users with that detail line when there is an error and possibly even adding details around that 403 for users that skip the docs and try to use the provider with the wrong API..

Hope this helps with the development of the provider 😄 Feel free to close it if it's not.

@linouk23
Copy link
Collaborator

Thanks for creating this issue @jshcmpbll!

I definitely agree that our lack of error messages is very confusing and that's something we've been working on so hopefully we'll fix it in our next 0.3.0 release, stay tuned!

@linouk23 linouk23 added the enhancement New feature or request label Dec 18, 2021
@linouk23
Copy link
Collaborator

👋 @jshcmpbll please check out our most recent 0.4.0 release where we fixed the issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants