blazerjob
Version:
TypeScript library for scheduling, executing, and managing asynchronous tasks (custom, HTTP, Cosmos) with a SQLite backend.
14 lines (13 loc) • 480 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleCosmosError = handleCosmosError;
function handleCosmosError(e) {
if (e && typeof e.message === 'string') {
if (e.message.includes('rate limit')) {
console.error('[Cosmos][RateLimit]', e.message);
// Ici, tu pourrais ajouter une logique de retry/backoff
}
// Ajoute ici d'autres gestions d'erreur spécifiques Cosmos
}
throw e;
}