Comments
This commit is contained in:
parent
c48527ad0c
commit
71a6795fce
4
main.js
4
main.js
|
@ -58,6 +58,10 @@ function createUrl() {
|
||||||
document.getElementById("error_dismiss").onclick = () =>{
|
document.getElementById("error_dismiss").onclick = () =>{
|
||||||
document.getElementById("error_container").classList.add("hidden");
|
document.getElementById("error_container").classList.add("hidden");
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Display alerts for errors (only handling 400 correctly r/n)
|
||||||
|
* @param {response} res The fetch response object
|
||||||
|
*/
|
||||||
function handleError(res) {
|
function handleError(res) {
|
||||||
if (res.status == 400) {
|
if (res.status == 400) {
|
||||||
res.text().then((body)=>{
|
res.text().then((body)=>{
|
||||||
|
|
Loading…
Reference in New Issue