hashicorp / go-retryablehttp

Retryable HTTP client in Go
Mozilla Public License 2.0
1.99k stars 251 forks source link

Improve `getBodyReaderAndContentLength` error #189

Open dmytrohridin opened 1 year ago

dmytrohridin commented 1 year ago

Right now function can return an error with very generic message. In case when body passes with wrong type. Can error contains supported types of body that it expected in message, or to make it backward compatible - return custom error with message that is currently returning but with additional field like []string SupportedTypes. If it make sense - I can submit a PR