anuraghazra / anuraghazra/github-readme-stats

bug: Error Handling in the Retryer

Open
#4,342 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
79.8k
Forks
37.7k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

Issue: In src/common/retryer.js, if an error occurs and it is not a "bad credentials" or "account suspended" error, the code returns err.response instead of throwing or handling the error.

This can lead to unexpected behavior downstream, as the calling code may expect a valid response object but instead gets an error response, possibly missing required fields.

### Expected behavior

it should consider always throwing an error for non-recoverable cases, or standardize the error object returned.

### Screenshots / Live demo link

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Read src/common/retryer.js first, focusing on the branch that handles errors other than bad credentials or account suspension. Trace how its return value is consumed to determine whether errors should be thrown or represented consistently. Done means non-recoverable errors no longer appear as misleading response objects and the chosen behavior is consistent for callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.