-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scraper: skip price info request for invalid SKUs
Some SKUs seem to have been removed from the CT database. Unfortunately, they are still listed by the API endpoints we use to list products and SKUs. When we attempt a PriceAvailability request for a batch of SKUs that contains an invalid SKU, the service replies with the following kind of error: { "statusCode": 400, "errors": [ "An error on the server occurred" ], "isCdsError": true, "error": "Bad Request", "errCode": "0", "xRequestId": null, "requestId": "3706a044-a8d1-4691-97cf-bdb78eae08c7", "correlationId": "f5ebd64d-8c62-4c6a-bb18-1989391cfa1a" } I have not found anything in the SKU listing response that allows us to determine which SKUs are no longer valid. For the moment, this provides a work-around by falling back to individually querying for the price of each SKU when a batch fails with the '400' status code. Signed-off-by: Jérémie Galarneau <[email protected]>
- Loading branch information
Showing
1 changed file
with
58 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters