Fix bug when trying to get the text response on failure

This commit is contained in:
Arnaud 2024-10-07 13:14:49 +02:00
parent ddc8158601
commit 53d5f8efa2
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -16,7 +16,7 @@ export const Fetch = {
}
if (!res.data.ok) {
const message = await Promises.safe(res.data.text);
const message = await Promises.safe(() => res.data.text());
if (message.error) {
return message;