You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Since 5041c41, configuring email
forwards have been broken with:
```
panic: interface conversion: interface {} is *improvmx.Meta, not *improvmx.Client
goroutine 22 [running]:
github.com/issyl0/terraform-provider-improvmx/improvmx.resourceEmailForwardCreate(0xc000179000, 0x1765080, 0xc00061e288, 0x0, 0xffffffffffffffff)
github.com/issyl0/terraform-provider-improvmx/improvmx/resource_email_forward.go:42 +0x25f
```
- I decided to use the same style of handling as in `resource_domain`,
by using a mutex lock on read, and doing rate limit debug logging too.
log.Printf("[DEBUG] Got status code %v from ImprovMX API on Read for email_forward %s@%s, success: %v, errors: %v.", resp.Code, d.Get("alias_name").(string), d.Get("domain").(string), resp.Success, resp.Errors)
58
+
59
+
ifresp.Code==429 {
60
+
log.Printf("[DEBUG] Sleeping for 10 seconds to allow rate limit to recover.")
log.Printf("[DEBUG] Got status code %v from ImprovMX API on Update for email_forward %s@%s, success: %v, errors: %v.", resp.Code, d.Get("domain").(string), d.Get("alias_name").(string), resp.Success, resp.Errors)
81
+
82
+
ifresp.Code==429 {
83
+
log.Printf("[DEBUG] Sleeping for 10 seconds to allow rate limit to recover.")
0 commit comments