@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
|
@@ -28,24 +28,9 @@ alwaysApply: false
|
|
|
28
28
|
|
|
29
29
|
### Error Handling
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|