Skip to content

sherlock: gate errorType message on HTTP status (fixes #2950) - #3072

Open
SkxOverKill wants to merge 1 commit into
sherlock-project:masterfrom
SkxOverKill:fix/message-error-type-status-gate
Open

SkxOverKill wants to merge 1 commit into
sherlock-project:masterfrom
SkxOverKill:fix/message-error-type-status-gate

Conversation

@SkxOverKill

Copy link
Copy Markdown

Summary

Fixes #2950 — minds (and every other errorType: "message" site) reported usernames as Claimed when the upstream returned a transient 5xx (e.g. HTTP 502 from the register/validate API) whose body lacked the configured errorMsg.

Root cause

In sherlock_project/sherlock.py, the errorType == "message" branch only did a substring check for errorMsg in the response body. Any non-2xx response without the error message fell through to QueryStatus.CLAIMED.

Changes

  • sherlock_project/sherlock.py: in the message branch, only report CLAIMED for healthy 200..299 responses when the error message is absent; non-2xx responses are downgraded to UNKNOWN.
  • tests/test_probes.py: new offline regression test (monkeypatches away the HTTP layer) asserting:
    • 502 + body without errorMsg → UNKNOWN (was CLAIMED),
    • 200 + body with errorMsg → AVAILABLE,
    • 200 + body without errorMsg → CLAIMED.

Verification

  • pytest tests/test_probes.py -m "not online" passes (2 passed).
  • Full offline suite remains green (the only pre-existing failures are environment-related py -m subprocess tests that also fail on master).

@SkxOverKill
SkxOverKill requested a review from ppfeister as a code owner August 12, 2026 08:06
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

Successfully merging this pull request may close these issues.

minds false positive on intermittent 5xx — errorType: "message" does not gate on HTTP status

1 participant