@karedo-hq/agents 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karedo-hq/agents",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Centralized agent skills, rules, and commands for our engineering team",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,24 +28,9 @@ alwaysApply: false
28
28
 
29
29
  ### Error Handling
30
30
 
31
- Use `parseApiResponse` from `@/lib/utils/parse-api-response` to safely parse API responses. This handles HTML error pages from proxies/load balancers gracefully (prevents cryptic "Unexpected token '<'" errors in production).
32
-
33
- ```typescript
34
- const { data, errorMessage } = await parseApiResponse<ResponseType>(
35
- response,
36
- 'Fallback error message',
37
- );
38
-
39
- if (errorMessage) {
40
- return {
41
- isSuccess: false,
42
- isError: true,
43
- errorMessage,
44
- };
45
- }
46
- ```
47
-
48
- **Catch block:** Use `getErrorMessage(error)` from `@/lib/utils/get-error-message`. Never use `getErrorMessage()` on strings (causes double-quoting).
31
+ - API errors (`!res.ok`): use `resJSON.message` directly
32
+ - Catch block: use `getErrorMessage(error)` from `@/lib/utils/get-error-message`
33
+ - Never use `getErrorMessage()` on strings (causes double-quoting)
49
34
 
50
35
  ### Fetch Headers
51
36