mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
format using dprint
This commit is contained in:
parent
654537c669
commit
4e8997d497
1 changed files with 6 additions and 2 deletions
|
|
@ -19,7 +19,9 @@ export async function postProto<T>(
|
|||
return outputType.fromBinary(outputBytes);
|
||||
} catch (err) {
|
||||
const { alertOnError = true } = options;
|
||||
if (alertOnError && !(err instanceof Error && err.message === "500: Interrupted")) {
|
||||
if (
|
||||
alertOnError && !(err instanceof Error && err.message === "500: Interrupted")
|
||||
) {
|
||||
alert(err);
|
||||
}
|
||||
throw err;
|
||||
|
|
@ -43,7 +45,9 @@ 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
|
||||
throw new Error(
|
||||
process.env.NODE_ENV === "production" ? `${msg}` : `${result.status}: ${msg}`
|
||||
process.env.NODE_ENV === "production"
|
||||
? `${msg}`
|
||||
: `${result.status}: ${msg}`,
|
||||
);
|
||||
}
|
||||
const blob = await result.blob();
|
||||
|
|
|
|||
Loading…
Reference in a new issue