Nobody has started this yet — be first.
Business impact
500 Internal Server Error is the single most common status code a struggling downstream returns. If this library's retry classifier no longer treats it as retryable, every charge (or any other operation wrapped in this executor) that hits a transient 500 short-circuits immediately instead of retrying -- landing in the DLQ after exactly one attempt, during exactly the kind of brief downstream blip retries exist to absorb. That's the difference between "the customer's payment succeeded on the automatic 3rd attempt, they never noticed" and "the customer's payment failed and support has to manually explain what a dead-letter queue is."
Problem
HTTPError.Retryable() is documented as "429 (rate limited) and any 5xx (server error) are [retryable]". The comparison it actually performs excludes exactly 500 from that set.
Current behavior
(&retry.HTTPError{StatusCode: 500}).Retryable() returns false.
Expected behavior
It should return true, exactly like 501, 502, 503, and every other 5xx already do.
Steps to reproduce
err := &retry.HTTPError{StatusCode: 500, Status: "500 Internal Server Error"} fmt.Println(err.Retryable()) // got: false, want: true
Why this matters
This one-character boundary bug silently narrows "any 5xx" to "any 5xx except the single most common one", which is the opposite of an edge case -- it's the common case being wrong while the edges (501, 503, ...) are right, making it easy to miss in ad-hoc testing that happens to poke a different status code.
Suggested approach
Retryable()'s doc comment says "any 5xx (server error)". Compare the comparison operator it actually uses against that documented contract -- the boundary value (500 itself) is the tell.
Acceptance criteria
Verification
go test ./test/ -run TestTask02 -v
Hints (0/2)
Try it without hints first — the reading is the exercise.
Working on this ticket
Work on a branch named for the ticket — that's what you'll submit.
Branch off your fork
Sign in to create it automatically, or do it yourself:
$git checkout -b fix/http-error-500-boundaryFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin fix/http-error-500-boundarySubmit it below
Paste your fork URL and the branch name, with a short write-up of the root cause.
Questions
Ask about anything unclear in the ticket — the maintainer and anyone who has solved it can answer. Please don't post full solutions.
Sign in to ask a question or reply.
Sign inhttp://localhost:8080POST /v1/chargesTo run against Redis (the multi-replica-safe backend) with zero local setup:
docker compose up --build # app + redis, hot-reloading on save
Work the tickets in tasks/ (ordered easy → hard); each names one Go test in test/:
make test-race # go test -race -count=1 ./...
go test ./test/ -run TestTask01 -v # a single ticket
Level 1
Fix a bug
Read existing behaviour, correct it.