grpc: make page_token error strings RPC-name-agnostic
This commit is contained in:
@@ -348,21 +348,21 @@ public sealed class GalaxyRepositoryGrpcService(
|
|||||||
{
|
{
|
||||||
throw new RpcException(new Status(
|
throw new RpcException(new Status(
|
||||||
StatusCode.InvalidArgument,
|
StatusCode.InvalidArgument,
|
||||||
"DiscoverHierarchy page_token is invalid."));
|
"page_token is invalid."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sequence != currentSequence)
|
if (sequence != currentSequence)
|
||||||
{
|
{
|
||||||
throw new RpcException(new Status(
|
throw new RpcException(new Status(
|
||||||
StatusCode.InvalidArgument,
|
StatusCode.InvalidArgument,
|
||||||
"DiscoverHierarchy page_token is stale."));
|
"page_token is stale."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.Equals(parts[1], currentFilterSignature, StringComparison.Ordinal))
|
if (!string.Equals(parts[1], currentFilterSignature, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
throw new RpcException(new Status(
|
throw new RpcException(new Status(
|
||||||
StatusCode.InvalidArgument,
|
StatusCode.InvalidArgument,
|
||||||
"DiscoverHierarchy page_token does not match the current filters."));
|
"page_token does not match the current filters."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageToken(sequence, parts[1], offset);
|
return new PageToken(sequence, parts[1], offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user