mirror of https://github.com/grpc/grpc-node.git
Fix typo in service config validation error messages
This commit is contained in:
parent
95516b66a0
commit
47ba357861
|
@ -133,14 +133,14 @@ function validateRetryPolicy(obj: any): RetryPolicy {
|
|||
for (const value of obj.retryableStatusCodes) {
|
||||
if (typeof value === 'number') {
|
||||
if (!Object.values(Status).includes(value)) {
|
||||
throw new Error('Invlid method config retry policy: retryableStatusCodes value not in status code range');
|
||||
throw new Error('Invalid method config retry policy: retryableStatusCodes value not in status code range');
|
||||
}
|
||||
} else if (typeof value === 'string') {
|
||||
if (!Object.values(Status).includes(value.toUpperCase())) {
|
||||
throw new Error('Invlid method config retry policy: retryableStatusCodes value not a status code name');
|
||||
throw new Error('Invalid method config retry policy: retryableStatusCodes value not a status code name');
|
||||
}
|
||||
} else {
|
||||
throw new Error('Invlid method config retry policy: retryableStatusCodes value must be a string or number');
|
||||
throw new Error('Invalid method config retry policy: retryableStatusCodes value must be a string or number');
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue