fix(letta-api): restore 429 rethrow in rejectApproval
Re-throws rate limit errors so callers bail out early instead of hammering the API in a tight loop. This was accidentally dropped during the merge.
This commit is contained in:
@@ -550,6 +550,12 @@ export async function rejectApproval(
|
|||||||
log.warn(`Approval already resolved for tool call ${approval.toolCallId}`);
|
log.warn(`Approval already resolved for tool call ${approval.toolCallId}`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// Re-throw rate limit errors so callers can bail out early instead of
|
||||||
|
// hammering the API in a tight loop.
|
||||||
|
if (err?.status === 429) {
|
||||||
|
log.error('Failed to reject approval:', e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
log.error('Failed to reject approval:', e);
|
log.error('Failed to reject approval:', e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user