question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose field_warnings / field_errors arrays for Lists.BatchAsync()

See original GitHub issue

Hi

The following call is failing for me. memberBatchList is a combination of new and existing subscribers to the list.

BatchList memberBatchList = new BatchList {
    Members = subscribers,
    UpdateExisting = false 
};
BatchListResponse resp = _mailChimp.Lists.BatchAsync(memberBatchList, this.mailChimpListId).Result;

resp.Errors contains an ErrorResponse for each provided Member. The Error property is “The resource submitted could not be validated. For field-specific details, see the ‘errors’ array.”

I’ve seen this before with different libraries, usually it’s a required merge field that is not present. Mailchimp passes these back via the field_errors array.

The docs say:

"InvalidResource The resource submitted could not be validated.

For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object."

Is it possible to expose these via this library?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
brandonseydelcommented, Apr 3, 2019

Sorry - Misread let me look into this more.

0reactions
brandonseydelcommented, Apr 4, 2019

Thank you for the research.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execute batch of promises in series. Once Promise.all is ...
I need to execute the first batch Promise.all(BigArray[0]) of calls/promises in parallel. Once the first batch of inner array is done, I need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found