I previously mentioned this issue in a comment on another discussion , but thought I had better raise it in this more appropriate forum instead. We are seeing failing requests to hosted feature services where a large number of values are passed in the where clause.
The error is
'SQL query is nested too deeply. Rewrite the query or break it up into smaller queries.' parameter is invalid"
From googling, this sounds like a SQL server error and so I suspect some fault within AGOL itself.
We are POSTing in a large number of values (say 10000) to a "get count only" query and would expect to see the number of valid ones returned (say 8000). We would then expect to pass these values to a geometry query and paginate through the results in the normal way. Both steps previously worked, but now do not.
Our client is esri-leaflet but this can be replicated directly in the REST API interface by passing in the same query parameters.
We are seeing this across multiple feature services across different organisations (some ours, some third-party).
This breaks our existing error handling code because the response comes back as http 200 but with a 400 code embedded within the response object.