Files
floci/src
Allen Sanborn 0264c1b960 fix(core): name the real pagination parameter in invalid-token errors (#5776)
* fix(core): name the real pagination parameter in invalid-token errors

The maxResults/nextToken overload of Pagination.paginate hardcoded
"Invalid nextToken." for a token that does not decode. Redshift
DescribeSnapshotCopyGrants and the DMS Describe* operations take that
token as Marker, so a malformed marker produced an error naming a
parameter those operations do not have.

Add an overload taking the wire name of the token parameter and use it
in the message; the existing overloads delegate with "nextToken", so
every NextToken caller is unchanged. The Redshift and both DMS call
sites (DescribeReplicationSubnetGroups and the shared describe used by
DescribeEndpoints, DescribeReplicationInstances and
DescribeReplicationTasks) now pass "Marker".

* fix(redshift,ce): name Marker and NextPageToken in invalid-token errors

DescribeSnapshotSchedules (added in #5574) takes its page token as Marker
but went through the paginate overload that reports "Invalid nextToken.".
Cost Explorer GetAnomalyMonitors and GetAnomalySubscriptions take
NextPageToken and had the same message. Both now pass the wire name to
the tokenName overload. These were the remaining paginate callers whose
token parameter is not nextToken; callers that render their own token
error (Lambda durable executions, Auto Scaling, SES, Cognito) are
unaffected.
2026-10-16 07:11:14 -04:00
..