Skip to content

[Refactor] Optimize Sholat Location Upsert and Improve Error Handling with Typed Exceptions#38

Merged
farulivan merged 1 commit into
mainfrom
refactor/sholat-infra-hardening
May 3, 2026
Merged

[Refactor] Optimize Sholat Location Upsert and Improve Error Handling with Typed Exceptions#38
farulivan merged 1 commit into
mainfrom
refactor/sholat-infra-hardening

Conversation

@farulivan

Copy link
Copy Markdown
Owner
  • Replace loop-based upsert with single batch insert using SQL excluded values
  • Add LocationNotFoundError and UpstreamUnavailableError custom error classes
  • Enhance fetchJson to catch network errors and distinguish 404 vs 5xx responses
  • Replace string-based error detection with instanceof checks for typed errors
  • Update tests to use typed error simulation methods
  • Only refresh location catalog on Location

…with typed exceptions

- Replace loop-based upsert with single batch insert using SQL excluded values
- Add LocationNotFoundError and UpstreamUnavailableError custom error classes
- Enhance fetchJson to catch network errors and distinguish 404 vs 5xx responses
- Replace string-based error detection with instanceof checks for typed errors
- Update tests to use typed error simulation methods
- Only refresh location catalog on Location
@farulivan farulivan self-assigned this May 3, 2026
@farulivan farulivan merged commit f718b95 into main May 3, 2026
2 checks passed
@farulivan farulivan deleted the refactor/sholat-infra-hardening branch May 3, 2026 05:12
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