feat: Enhance HaloClient with retry logic and improve error handling

- Added retry options to HaloClient for handling transient errors.
- Refactored request methods in HaloClient to utilize retry logic.
- Updated HaloService to include logging for error handling.
- Introduced ApiPaths utility for managing API endpoints.
- Implemented logger utility for consistent logging across services.
- Added tests for ContentService, Error handling, and TaxonomyService.
- Created retry utility for managing retry logic with exponential backoff.
- Updated types to include additional properties for better API response handling.
This commit is contained in:
2026-04-28 18:01:26 +08:00
parent b7f6288492
commit 12a7aebeff
18 changed files with 1573 additions and 815 deletions
+5 -2
View File
@@ -8,7 +8,9 @@
"dev": "rslib build --watch",
"build": "rslib build",
"version": "node version-bump.mjs && git add manifest.json versions.json",
"check": "biome check --write src/"
"check": "biome check --write src/",
"test": "vitest",
"test:run": "vitest run"
},
"author": "LHY",
"maintainers": [
@@ -28,7 +30,8 @@
"builtin-modules": "3.3.0",
"obsidian": "latest",
"tslib": "2.6.0",
"typescript": "5.1.6"
"typescript": "5.1.6",
"vitest": "^4.1.5"
},
"dependencies": {
"@halo-dev/api-client": "^2.20.0",