commercetools/commercetools-sdk-java-v2

Unable to Query Orders with SDK2

jon-wong-dawn-foods opened this issue · 0 comments

Hi all,

I am getting the following error when trying to query orders when upgrading from SDK1 to SDK2:

Caused by: com.commercetools.api.client.error.BadRequestException: detailMessage: Client error response [url] https://api.commercetools.co/dgp_dev/orders?var.cutoff=2021-03-12T15%3A38%3A18.460381Z&limit=500&offset=0&where=customerId++in+%28%22%5B7e66ac01-b0b1-4d61-9f75-7c7c487cd8b9%5D%22%29&sort=id+asc [status code] 400 [reason phrase] Bad Request summary: GET https://api.commercetools.co/dgp_dev/orders?var.cutoff=2021-03-12T15%3A38%3A18.460381Z&limit=500&offset=0&where=customerId++in+%28%22%5B7e66ac01-b0b1-4d61-9f75-7c7c487cd8b9%5D%22%29&sort=id+asc failed with response code 400 with X-Correlation-ID {key=x-correlation-id, value=projects-c0494e35-5fd1-43f6-aac7-936100e737a6}on 2022-04-12T14:38:19.061934Z http response formatted body: { "statusCode" : 400, "message" : "Malformed parameter: where: UUID string too large", "errors" : [ { "code" : "InvalidInput", "message" : "Malformed parameter: where: UUID string too large" } ] } http response: io.vrap.rmf.base.client.ApiHttpResponse@4092aa00[statusCode=400,headers=[{key=access-control-allow-headers, value=Accept, Authorization, Content-Type, Origin, User-Agent, X-Correlation-ID}, {key=access-control-allow-methods, value=GET, POST, DELETE, OPTIONS}, {key=access-control-allow-origin, value=*}, {key=access-control-expose-headers, value=X-Correlation-ID}, {key=access-control-max-age, value=299}, {key=alt-svc, value=clear}, {key=content-length, value=177}, {key=content-type, value=application/json; charset=utf-8}, {key=date, value=Tue, 12 Apr 2022 14:38:18 GMT}, {key=server, value=istio-envoy}, {key=server-timing, value=projects;dur=3}, {key=via, value=1.1 google}, {key=x-correlation-id, value=projects-c0494e35-5fd1-43f6-aac7-936100e737a6}, {key=x-envoy-upstream-service-time, value=3}, {key=x-http-status-caused-by-external-upstream, value=false}],textInterpretedBody={"statusCode":400,"message":"Malformed parameter: where: UUID string too large","errors":[{"code":"InvalidInput","message":"Malformed parameter: where: UUID string too large"}]}] SDK: 8.5.0 endpoint: GET https://api.commercetools.co/dgp_dev/orders?var.cutoff=2021-03-12T15%3A38%3A18.460381Z&limit=500&offset=0&where=customerId++in+%28%22%5B7e66ac01-b0b1-4d61-9f75-7c7c487cd8b9%5D%22%29&sort=id+asc Java: 11.0.9.1 cwd: /Users/jon/repos/b2b-order-service request: io.vrap.rmf.base.client.ApiHttpRequest@1770a0f2[method=GET,uri="https://api.commercetools.co/dgp_dev/orders?var.cutoff=2021-03-12T15%3A38%3A18.460381Z&limit=500&offset=0&where=customerId++in+%28%22%5B7e66ac01-b0b1-4d61-9f75-7c7c487cd8b9%5D%22%29&sort=id+asc",headers=[{key=Authorization, value=**removed from output**}],textInterpretedBody=empty body] http request: io.vrap.rmf.base.client.ApiHttpRequest@1770a0f2[method=GET,uri="https://api.commercetools.co/dgp_dev/orders?var.cutoff=2021-03-12T15%3A38%3A18.460381Z&limit=500&offset=0&where=customerId++in+%28%22%5B7e66ac01-b0b1-4d61-9f75-7c7c487cd8b9%5D%22%29&sort=id+asc",headers=[{key=Authorization, value=**removed from output**}],textInterpretedBody=empty body]
I see the UUID string is too large. It looks like the issue is with the date? Could you please advise?