Error message on pdf generation fail

ref #62
This commit is contained in:
2021-02-20 17:25:48 +01:00
parent 4ece21cdf2
commit 12bcbd28f3
7 changed files with 314 additions and 247 deletions

View File

@@ -66,7 +66,18 @@
body: JSON.stringify(runners),
}
)
.then((response) => response.blob())
.then((response) => {
if (response.status != '200') {
const toast = Toastify({
text: $_('pdf-generation-failed'),
duration: 1000,
backgroundColor:
'linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)',
}).showToast();
} else {
return response.blob();
}
})
.then((blob) => {
count++;
const url = window.URL.createObjectURL(blob);