Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests can be made again when an unexpected error occurs. #20

Closed
dev-coco opened this issue Jan 28, 2024 · 1 comment
Closed

Requests can be made again when an unexpected error occurs. #20

dev-coco opened this issue Jan 28, 2024 · 1 comment

Comments

@dev-coco
Copy link
Contributor

πŸ‘‰ Found 1157 URLs in 1 sitemap
πŸ“¦ Batch 1 of 24 complete
πŸ“¦ Batch 2 of 24 complete
πŸ“¦ Batch 3 of 24 complete
πŸ“¦ Batch 4 of 24 complete
πŸ“¦ Batch 5 of 24 complete
πŸ“¦ Batch 6 of 24 complete
πŸ“¦ Batch 7 of 24 complete
πŸ“¦ Batch 8 of 24 complete
❌ Failed to get indexing status.
Error was: Error: Server error code 500
{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

file:///Users/raz1ner/Downloads/google-indexing-script/src/shared/utils.mjs:17
      throw new Error(`Server error code ${response.status}\n${body}`);
            ^

Error: Server error code 500
{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

Sometimes unexpected errors occur during usage, so I have to start over and run it again. It would be great if, when an unexpected error occurs, the request causing the error could be resubmitted instead of stopping directly.

@goenning
Copy link
Owner

There’s a 3 retries per request already, but it seems like they all failed.

we could try using increasing to 5 and adding an exponential back off delay. Would you like to send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants