Search crashed during dynamic offset/limit
Because Box doesn't support search by multiple metadata templates i forced to do a several call of the search api:
- Search for TEMPLATE_A.FIELD_A = XXX with limit 10
- When the page isn't filled with the result i do extra call for TEMPLATE_B.FIELD_B = XXX with limit = 10 - search1.entries.length
So:
Page1:
searchA({ offset: 0, limit: 10 }) -> return 6 records
searchB({ offset: 0, limit: 4 }) -> return 4 records = total 10
Page2:
searchB({ offset: 4, limit: 10 }) -> should return 10 records, but return an error
but the searchB({ offset: 4, limit: 10 }) throw an error: "UnhandledPromiseRejectionWarning: Error: Unexpected API Response [400 Bad Request | fzwuajh3a6k4akwd.067bf6953bfeeefdd8cafb43830054e6c] bad_request - Bad Request"
投稿コメントは受け付けていません。
コメント
1件のコメント