MCPcopy Create free account
hub / github.com/EvoMap/evolver / classifyFailure

Function classifyFailure

src/gep/validator/stakeBootstrap.js:187–192  ·  view source on GitHub ↗
(status, errorText)

Source from the content-addressed store, hash-verified

185}
186
187function classifyFailure(status, errorText) {
188 const text = String(errorText || '').toLowerCase();
189 if (status === 402 || text.includes('insufficient_credits')) return 'funds';
190 if (status === 400 || status === 403 || status === 404) return 'permanent';
191 return 'transient';
192}
193
194function parseShortfall(errorText) {
195 const match = String(errorText || '').match(/need\s+(\d+(?:\.\d+)?),\s*have\s+(\d+(?:\.\d+)?)/i);

Callers 1

ensureValidatorStakeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected