D1 responds with empty array

I have a worker(production env) which makes requests to D1 and gets data using D1 client. All of a sudden, it does not give any results but there is no error as such (results property is an empty array). Same sql statement through the D1 console fetches multiple columns of data. This is the response from D1
“results”: ,
“success”: true,
“meta”: {
“served_by”: “v3-prod”,
“duration”: 0.1914,
“changes”: 0,
“last_row_id”: 0,
“changed_db”: false,
“size_after”: 3907584,
“rows_read”: 10,
“rows_written”: 0

3 posts were merged into an existing topic: D1 read request