Our resource provider and job creator use an internal HTTP package that relies on hashicorp/go-retryablehttp for retries. On reaching the maximum number of retries, the client reports an error like:
POST http://localhost:8080/api/v1/resource_offers giving up after 11 attempt(s)
This error message indicates the endpoint and number of retries, but does not report the response error body. Let's implement a custom error handler to report error bodies so users will know what went wrong.
Our resource provider and job creator use an internal HTTP package that relies on
hashicorp/go-retryablehttp
for retries. On reaching the maximum number of retries, the client reports an error like:This error message indicates the endpoint and number of retries, but does not report the response error body. Let's implement a custom error handler to report error bodies so users will know what went wrong.