@zhafron/opencode-kiro-auth 1.4.7 → 1.4.8
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/dist/plugin.js +4 -3
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -269,15 +269,16 @@ export const createKiroPlugin = (id) => async ({ client, directory }) => {
|
|
|
269
269
|
catch (e) {
|
|
270
270
|
// If we can't parse the error, use default message
|
|
271
271
|
}
|
|
272
|
-
if (acc.failCount <
|
|
272
|
+
if (acc.failCount < 5) {
|
|
273
273
|
const delay = 1000 * Math.pow(2, acc.failCount - 1);
|
|
274
274
|
showToast(`Server Error (500): ${errorMessage}. Retrying in ${Math.ceil(delay / 1000)}s...`, 'warning');
|
|
275
275
|
await sleep(delay);
|
|
276
276
|
continue;
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
|
-
acc
|
|
280
|
-
|
|
279
|
+
am.markUnhealthy(acc, `Server Error (500) after 5 attempts: ${errorMessage}`);
|
|
280
|
+
await am.saveToDisk();
|
|
281
|
+
showToast(`Server Error (500): ${errorMessage}. Marking account as unhealthy and switching...`, 'warning');
|
|
281
282
|
continue;
|
|
282
283
|
}
|
|
283
284
|
}
|