mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-13 16:43:04 -04:00
UserScript: Fix fetch().res.ok
This commit is contained in:
parent
53ff2532f4
commit
2815509c00
2 changed files with 20 additions and 55 deletions
|
@ -59,7 +59,7 @@ export async function translate(kind: "received" | "sent", text: string): Promis
|
|||
const res = await fetch(url);
|
||||
if (!res.ok)
|
||||
throw new Error(
|
||||
`Failed to translate "${text}" (${sourceLang} -> ${targetLang}`
|
||||
`Failed to translate "${text}" (${sourceLang} -> ${targetLang})`
|
||||
+ `\n${res.status} ${res.statusText}`
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue