Skip to content

fix: Throw Zod validation errors instead of silently returning null (apn-akhtf)#308

Merged
paulvanbrenk merged 3 commits intomainfrom
merge/apn-akhtf
Feb 17, 2026
Merged

fix: Throw Zod validation errors instead of silently returning null (apn-akhtf)#308
paulvanbrenk merged 3 commits intomainfrom
merge/apn-akhtf

Conversation

@paulvanbrenk
Copy link
Collaborator

Summary

  • Renames safeParse to validateResponse in API hooks
  • Throws Zod validation errors instead of silently returning null
  • Removes null-coalescing fallbacks that masked validation failures
  • Users now see proper error states instead of misleading "no data" when API responses don't match schemas

Test plan

  • All 406 .NET tests pass
  • Clean rebase on main, no conflicts

🤖 Generated with Claude Code

paulvanbrenk and others added 3 commits February 16, 2026 21:06
Renamed safeParse to validateResponse and changed it to throw on
validation failure. This surfaces schema mismatches as React Query
errors instead of silently returning null data (which made users
see "no releases" instead of an error message).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…il on unmatched mock requests

Prevent partial sync orphans by collecting releases in a local list
during the GitHub fetch loop, only adding them to the DbContext after
the loop completes. Also make MockHttpMessageHandler throw on unmatched
requests instead of silently returning empty arrays.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paulvanbrenk paulvanbrenk merged commit 793e7c2 into main Feb 17, 2026
8 checks passed
@paulvanbrenk paulvanbrenk deleted the merge/apn-akhtf branch February 17, 2026 02:22
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.

1 participant