Skip to content

Fix: replace silent Result.taken() fallthrough with explicit Result.error() - #450

Merged
kaifcodec merged 1 commit into
kaifcodec:mainfrom
A-S-Manoj:fix/silent-taken-fallthrough
Jul 24, 2026
Merged

Fix: replace silent Result.taken() fallthrough with explicit Result.error()#450
kaifcodec merged 1 commit into
kaifcodec:mainfrom
A-S-Manoj:fix/silent-taken-fallthrough

Conversation

@A-S-Manoj

Copy link
Copy Markdown
Contributor

Closes #449

Summary

Several user_scan validators silently swallowed parse failures or unrecognized 200 response shapes and fell through to an unconditional Result.taken(), instead of returning Result.error(...) as required by the module guidelines (Strict Error Handling section of CONTRIBUTING.md).

This replaces that fallback with an explicit error across all 7 affected files:

return Result.error("200 response status with no recognizable data, report it via GitHub issues")

Files changed

  • user_scanner/user_scan/finance/destream.py
  • user_scanner/user_scan/gaming/apexlegends.py
  • user_scanner/user_scan/gaming/minecraft.py
  • user_scanner/user_scan/gaming/lichess.py
  • user_scanner/user_scan/gaming/chess_com.py
  • user_scanner/user_scan/dev/codecademy.py
  • user_scanner/user_scan/dev/githubgist.py

Testing

  • ruff check . — passed
  • mypy user_scanner — passed
  • pytest — no test regressions (no per-module tests exist for these validators; existing suite unaffected)

@kaifcodec kaifcodec left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@A-S-Manoj Thanks for the PR, it is ok to me. Merging it.

@kaifcodec
kaifcodec merged commit b534b02 into kaifcodec:main Jul 24, 2026
2 checks passed
@kaifcodec kaifcodec added enhancement New feature, request, code improvements/upgrade, performance boost bug fix Fixed a bug in existing files labels Jul 24, 2026
@A-S-Manoj
A-S-Manoj deleted the fix/silent-taken-fallthrough branch August 3, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Fixed a bug in existing files enhancement New feature, request, code improvements/upgrade, performance boost

2 participants