Open jimlindeman opened 1 year ago
I looked more and see trace-ids (if logdna provides them in response headers) could then be logged in https://github.com/logdna/terraform-provider-logdna/blob/master/logdna/request.go#L78.
May make more sense to log the request body there based on certain res.StatusCode values, so that necessary debug information is available for multiple types of calls.
We're seeing a case where the IBM Terraform schematics uses the code in https://github.com/logdna/terraform-provider-logdna/blob/main/logdna/resource_archive.go#L167 to enable configuration of an COS based archive storage, but the error we're getting back:
The input passed into the provider seems correct:
Unfortunately, this error coming back from logDNA doesn't give us any indication as to what field/setting was 'invalid', so we need the provider to log more information in these error cases like the request body or if there is a trace-id response header from logDNA, we should be logging that.
i.e. we need the current code doing:
to do something like: