fatwang2/jev-review-action on GitHub
- Stars
- 1
- Forks
- 1
- Language
- JavaScript
- License
- MIT
- Last push
- 20 Sep 2026
Read from GitHub on . Counts change daily.
How it uses Jev
export const isProviderOutage = error => error?.status === 402 || error?.status === 429 || error?.status >= 500;
/** Asks the provider chain; each fallback is tried once, in order, for outages only. */
export async function systemOne(judge, { state, questions, fetchImpl }) {
invariant(judge?.providers?.length, 'No Jev provider is configured');
for (let index = 0; ; index++) {
const config = judge.providers[index];
try { return await call(config, state, questions, fetchImpl); }
catch (error) {
const next = judge.providers[index + 1];
if (!next || !isProviderOutage(error)) throw error;
console.warn(`Jev provider ${config.provider} returned HTTP ${error.status}; retrying with ${next.provider}`);
}
}
}

