-
Notifications
You must be signed in to change notification settings - Fork 4
Cursor pagination resulting in 500 error #73
Copy link
Copy link
Open
Description
When I tried to use the nextPageLink retrieved from the first request for the next pagination request, 500 error response received.
Sample request code,
$listPaymentsData = new ListPaymentsData([
'nextPageUrl' => "https:\/\/global-api.afterpay.com\/v2\/payments?cursor=FooBarAyNDA2MTYJUSNQxMDIwLjEwOVo%3D%3AMDAxLnN2Z3Vnbmc4bWxrYzYyZWxyMnZkMXBmb3JzdW11NDc0NDc0bXJvMHZzbjBhcXN1aw%3D%3D&statuses=APPROVED&fromCreatedDate=2024-06-03T14%3A05%3A15+10%3A00&includeNextLink=true&toCreatedDate=2024-06-11T14%3A25%3A15+10%3A00",
]);
$result = resolve(AfterpayApiService::class)->listPayments($listPaymentsData);
Response:
HTTP request returned status code 500:
{
"errorCode" : "error",
"errorId" : "9940463abf9b1a1e",
"message" : "An error occurred processing your request",
(truncated...).
Note that the nextPageUrl contains statuses, fromCreatedDate, toCreatedDate. If I remove them and just keep the cursor parameter, it works. Is it this intended and safe to remove those parameters for pagination request?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels