@blockrun/franklin 3.1.1 → 3.1.2
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.
|
@@ -54,6 +54,13 @@ export function classifyAgentError(message) {
|
|
|
54
54
|
'internal server error',
|
|
55
55
|
'bad gateway',
|
|
56
56
|
'service unavailable',
|
|
57
|
+
'temporarily unavailable', // "Service temporarily unavailable"
|
|
58
|
+
'workers are busy', // "All workers are busy"
|
|
59
|
+
'server busy',
|
|
60
|
+
'overloaded',
|
|
61
|
+
'please retry later',
|
|
62
|
+
'retry in a few',
|
|
63
|
+
'upstream error',
|
|
57
64
|
])) {
|
|
58
65
|
return { category: 'server', label: 'Server', isTransient: true };
|
|
59
66
|
}
|
package/dist/agent/llm.js
CHANGED
|
@@ -280,7 +280,11 @@ export class ModelClient {
|
|
|
280
280
|
}
|
|
281
281
|
case 'error': {
|
|
282
282
|
const errMsg = chunk.payload['message'] || 'API error';
|
|
283
|
-
|
|
283
|
+
const status = chunk.payload['status'];
|
|
284
|
+
// Prefix with HTTP status so classifyAgentError() can match on it
|
|
285
|
+
// (the inner JSON .message field often strips the status code, e.g.
|
|
286
|
+
// "Service temporarily unavailable" doesn't contain "503").
|
|
287
|
+
throw new Error(status ? `HTTP ${status}: ${errMsg}` : errMsg);
|
|
284
288
|
}
|
|
285
289
|
}
|
|
286
290
|
}
|
package/package.json
CHANGED