user: throw on 200 status code if there's error in body

This commit is contained in:
thecodrr
2020-04-25 12:09:20 +05:00
parent ce0b4904d6
commit bbebee06a0

View File

@@ -97,9 +97,9 @@ async function authRequest(endpoint, data) {
if (response.ok) {
let result = await response.json();
/* TODO if (result.error) {
if (result.error) {
throw new Error(result.error);
} */
}
return result;
}