[ui] better error message on raw open fail

feat/vaults
Tomáš Mládek 2022-02-03 16:30:17 +01:00
parent 2173ca5b51
commit 7673f6d74a
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 2 additions and 2 deletions

View File

@ -50,9 +50,9 @@
)
);
fetch(`/api/raw/${address}?native=1`)
.then((response) => {
.then(async (response) => {
if (!response.ok) {
throw new Error(response.statusText);
throw new Error(`${response.statusText} - ${await response.text()}`);
}
if (response.headers.has("warning")) {
const warningText = response.headers