Files
discord-decomp/modules/collectibles/api/Shopfront.tsx
T
2026-11-01 12:12:55 +02:00

55 lines
1.3 KiB
TypeScript

// Metro module 14098 (f14099).
import { Endpoints } from "../../../Constants";
import { HTTP } from "../../../_bundle/sendRequest";
import { APIError } from "../../../_bundle/convertStringArrayToSkemaErrorItems";
import { captureOrIgnoreApiError } from "../../errors/ErrorHandlingUtils";
export async function search(c27634_0, c27634_1) {
let body;
let c27634_4;
let c27634_5 = 0;
let c30701_1, c30701_0, c30701_2, c30701_3;
try {
c30701_1 = void 0;
c30701_0 = c27634_0;
let r30 = c27634_1;
if (r30 === void 0) {
r30 = {};
}
c30701_1 = r30.timeout;
c30701_2 = void 0;
await void 0;
c27634_5 = 1;
body = (await HTTP.get({
url: Endpoints.COLLECTIBLES_SEARCH,
query: c30701_0,
rejectWithError: true,
timeout: c30701_1
})).body;
c27634_5 = 0;
} catch ($e) {
const r27 = $e;
let r8 = r27;
c27634_4 = r27;
if (c27634_5 !== 0) {
while (true) {
try {
const r82 = c27634_4;
c27634_5 = 0;
c30701_3 = r82;
c30701_2 = new APIError(c30701_3);
captureOrIgnoreApiError(c30701_2);
throw c30701_2;
} catch (r78) {
r8 = r78;
c27634_4 = r78;
if (c27634_5 === 0) {
break;
}
}
}
}
throw r8;
}
return body;
}