Getting a 500 error on email list (REST API) when no results{TOKEN}&contact_id=123456

The above endpoint works for most of my contacts, but a select few are returning
{“message”:“General error”}
and HTTP 500 status code.

Seems to be ones that have no emails sent, so zero results… Shouldn’t be a 500 error though should it?

This is almost always a response to an invalidly formatted json string. I’d start from scratch with the sample body that documentation provides and then work forward from there.

There is no body, just the query listed in the OP. It fails on the interactive docs too if I use one of the affected contacts.

EDIT: Also found out it returns 500 if I filter by email for an address that’s not in our system. Should really return a 404 or empty result instead of an internal server error.

If you’re just getting a list then it can also be a performance error (which would be a 5xx error). have you tried setting a limit of 10 or something lower to check this?

It’s per contact, there’s very rarely more than a dozen, but it still fails with limit=10.

You could also try setting the since date to a day (or week) ago. It’s almost always performace timeouts when I get 5xx errors with good code.

That didn’t fix it either. I didn’t expect it would as the original problem is for records with zero emails sent (so the filter wouldn’t be filtering anything). Also the request returns very quickly. Chrome tools say 164ms.


@Joe_Wild I’ve replicated the issue and will get this to development to fix.

Any idea when this will be fixed? I’m still getting these errors in my log every day.