Fix typo in service config validation error messages

This commit is contained in:
Michael Lumish 2022-11-17 09:34:16 -08:00
parent 95516b66a0
commit 47ba357861
1 changed files with 3 additions and 3 deletions

View File

@ -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 {