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
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.
body, err := req.MakeRequest()
if err != nil {
if strings.Contains(err.Error(), 'BadRequest') {
b, err := json.Marshal(req)
// trace-id headers, if any from logDNA, have to be collected in error path of MakeRequest()
return diag.ErrorF("Input error in request to configure logDNA archive. Err: %s , Request: %s", err.Error(), b)
} else {
return diag.FromErr(err)
}
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: