feat(error-handling): Implement comprehensive gateway error handling with user-friendly messages

- Add comprehensive gateway error handler with friendly user messages
- Handle subscription status errors (inactive BYOK, subscription required)
- Handle authentication errors (invalid API keys, missing tokens)
- Handle rate limiting with retry suggestions
- Handle model availability and validation errors
- Handle network connectivity issues
- Provide actionable solutions for each error type
- Prevent duplicate error messages by returning early after showing friendly error
- Fix telemetry tests to use correct environment variable names (TASKMASTER_API_KEY)
- Fix config manager getUserId function to properly save default userId to file
- All tests now passing (34 test suites, 360 tests)
This commit is contained in:
Eyal Toledano
2025-06-02 12:34:47 -04:00
parent 2819be51d3
commit 58aa0992f6
8 changed files with 304 additions and 87 deletions

3
package-lock.json generated
View File

@@ -45,7 +45,8 @@
"ora": "^8.2.0",
"task-master-ai": "^0.15.0",
"uuid": "^11.1.0",
"zod": "^3.23.8"
"zod": "^3.23.8",
"zod-to-json-schema": "^3.24.5"
},
"bin": {
"task-master": "bin/task-master.js",