question

matt avatar image
matt asked ·

REST API internal server error 500 with filter

Hi,

I get 500 errors, when using the filter "createdTime" and specifying a longer time period for the payments route. The request works when turning off the filter completely or when specifying a short time period (a year or so works)

Request:

https://api.clover.com/v3/merchants/C1B31MQ6CTAKC/payments?access_token=XXX&expand=tender&expand=cardTransaction&limit=1000&offset=0&filter=createdTime>=1302114988000

Access token is in separate moderator's post


REST API
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian answered ·

This can happen for queries that are not constrained enough. Merchants can have a lot of orders, so querying for large time periods is problematic. Please limit your queries to avoid these issues.

2 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Well...then it's still not good, because there should be a useful response. In addition, it worked WITHOUT filter, but it did not work WITH filter. Since the response is anyway limited to 1000 datasets, IMHO there should not be 500 errors.

0 Likes 0 ·

I agree, but it is also not good to do open or broad queries. Just because the response is limited does not mean the query is performant.

1 Like 1 ·
matt avatar image
matt answered ·

the error has disappeared - still Clover's API should not return 500s - probably overwhelmed or whatever...

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community