Skip to content

Commit f8ee226

Browse files
committed
cspell
1 parent 048e096 commit f8ee226

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

website/pages/docs/production-errors-debug.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ To implement fallback strategies:
503503
Retry transient failures automatically before reporting errors to clients.
504504
505505
```javascript
506-
export async function retryableOperation(operation, maxRetries = 3) {
506+
export async function retryOperation(operation, maxRetries = 3) {
507507
let lastError;
508508

509509
for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -512,7 +512,7 @@ export async function retryableOperation(operation, maxRetries = 3) {
512512
} catch (error) {
513513
lastError = error;
514514

515-
if (!isRetryable(error)) {
515+
if (!isRetry(error)) {
516516
throw error;
517517
}
518518

@@ -530,15 +530,15 @@ export async function retryableOperation(operation, maxRetries = 3) {
530530
throw lastError;
531531
}
532532

533-
function isRetryable(error) {
534-
const retryableCodes = ['ETIMEDOUT', 'ECONNRESET', 'ENOTFOUND'];
535-
return retryableCodes.includes(error.code) || error.statusCode >= 500;
533+
function isRetry(error) {
534+
const retryCodes = ['ETIMEDOUT', 'ECONNRESET', 'ENOTFOUND'];
535+
return retryCodes.includes(error.code) || error.statusCode >= 500;
536536
}
537537

538538
// In resolver
539539
const Query = {
540540
posts: async (parent, args, context) => {
541-
return retryableOperation(() => fetchPosts(args.limit));
541+
return retryOperation(() => fetchPosts(args.limit));
542542
}
543543
};
544544
```

0 commit comments

Comments
 (0)