-
Notifications
You must be signed in to change notification settings - Fork 256
Description
Is your feature request related to a problem? Please describe.
We maintain an HTTP server that provides access to access Terraform modules using custom query parameters in the source URL.
If there is an issue with the query parameters, and the server returns a 400, the only message that is displayed to the user is:
Error: Response code 400 (Bad Request)
Describe the solution you'd like:
On error return more information from the failed HTTP request.
For example, an error returned by the server can provide a message
field or an errors
field, which is displayed to the user.
Error: Response code 400 (Bad Request)
Errors: The provided query parameter "foo" contains an invalid value.
Describe alternatives you've considered
N/A
Additional context
Current return logic:
Line 275 in f7836fb
if resp.StatusCode < 200 || resp.StatusCode >= 300 { |
Similar request from the vault-action
repo:
hashicorp/vault-action#273