@hienlh/ppm 0.8.75 → 0.8.76

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.76] - 2026-04-01
4
+
5
+ ### Fixed
6
+ - **SDK error messages**: 500/5xx server errors and 429 rate-limits now show correct user-facing messages instead of confusing "unknown API error" with debug instructions
7
+ - **Session title on resume**: Prioritize DB-stored title when resuming a chat session
8
+
3
9
  ## [0.8.75] - 2026-04-01
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.8.75",
3
+ "version": "0.8.76",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -632,13 +632,21 @@ export class ClaudeAgentSdkProvider implements AIProvider {
632
632
  // SDK assistant messages can carry an error field for auth/billing/rate-limit failures
633
633
  let assistantError = (msg as any).error as string | undefined;
634
634
 
635
- // SDK sometimes returns auth errors as text content without setting error field.
636
- // Detect 401 pattern in text: "Failed to authenticate. API Error: 401 ..."
637
- if (!assistantError) {
635
+ // SDK sometimes returns errors as text content without setting a specific error field.
636
+ // Detect known HTTP error patterns in text and reclassify accordingly.
637
+ if (!assistantError || assistantError === "unknown") {
638
638
  const textContent = this.extractAssistantText(msg);
639
- if (textContent && /API Error:\s*401\b.*authentication_error/i.test(textContent)) {
640
- assistantError = "authentication_failed";
641
- console.warn(`[sdk] session=${sessionId} detected 401 in assistant text content — treating as auth error`);
639
+ if (textContent) {
640
+ if (/API Error:\s*401\b.*authentication_error/i.test(textContent)) {
641
+ assistantError = "authentication_failed";
642
+ console.warn(`[sdk] session=${sessionId} detected 401 in assistant text content — treating as auth error`);
643
+ } else if (/API Error:\s*5\d{2}\b/i.test(textContent) || /internal server error/i.test(textContent)) {
644
+ assistantError = "server_error";
645
+ console.warn(`[sdk] session=${sessionId} detected 5xx in assistant text content — treating as server error`);
646
+ } else if (/API Error:\s*429\b/i.test(textContent) || /rate.?limit/i.test(textContent)) {
647
+ assistantError = "rate_limit";
648
+ console.warn(`[sdk] session=${sessionId} detected 429/rate-limit in assistant text content — treating as rate limit`);
649
+ }
642
650
  }
643
651
  }
644
652