MCPcopy Create free account
hub / github.com/MathMan05/Fermi / makeError

Method makeError

src/webpage/settings.ts:2451–2469  ·  view source on GitHub ↗
(e: HTMLDivElement, message: string)

Source from the content-addressed store, hash-verified

2449 }
2450 return;
2451 }
2452 };
2453 const doFetch = async () => {
2454 fetch(this.fetchURL, {
2455 method: this.method,
2456 body: JSON.stringify(build),
2457 headers: this.headers,
2458 })
2459 .then(async (_) => {
2460 return [await _.text(), _.status] as const;
2461 })
2462 .then(([_, status]) => {
2463 if (_ === "") return [null, status];
2464 return [JSON.parse(_), status] as const;
2465 })
2466 .then(async ([json, status]) => {
2467 if (await handleCaptcha(json, build, this.captcha)) {
2468 return await doFetch();
2469 }
2470 const match = this.fetchURL.match(/https?:\/\/[^\/]*\/api/gm);
2471 if (match && this.tfaCheck) {
2472 const tried = await handle2fa(json, match[0]);

Callers 3

handleErrorMethod · 0.95
errorsMethod · 0.95
errorMethod · 0.95

Calls 2

addMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected