fix style again because the last one was using pretier not dprint

This commit is contained in:
medProgAyat 2025-10-07 19:51:37 +03:30
parent 021d0cd968
commit 654537c669

View file

@ -19,10 +19,7 @@ export async function postProto<T>(
return outputType.fromBinary(outputBytes); return outputType.fromBinary(outputBytes);
} catch (err) { } catch (err) {
const { alertOnError = true } = options; const { alertOnError = true } = options;
if ( if (alertOnError && !(err instanceof Error && err.message === "500: Interrupted")) {
alertOnError &&
!(err instanceof Error && err.message === "500: Interrupted")
) {
alert(err); alert(err);
} }
throw err; throw err;
@ -46,9 +43,7 @@ async function postProtoInner(url: string, body: Uint8Array): Promise<Uint8Array
} }
// it is ugly to show internall server client status to user, we should just show error's to user // it is ugly to show internall server client status to user, we should just show error's to user
throw new Error( throw new Error(
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production" ? `${msg}` : `${result.status}: ${msg}`
? `${msg}`
: `${result.status}: ${msg}`,
); );
} }
const blob = await result.blob(); const blob = await result.blob();