Projekt

Obecné

Profil

« Předchozí | Další » 

Revize dde3db30

Přidáno uživatelem Jan Pašek před téměř 4 roky(ů)

Re #8587 - Error handling improved in all javascript files

Zobrazit rozdíly:

static/js/index.js
43 43
        },
44 44
        loadPage: async function (page, perPage) {
45 45
            // download a list of all available certificates and display them in the table
46
            this.errorMessage = "";
46 47
            try {
47 48
                var params = {
48 49
                    page: page - 1,
......
59 60
                    this.hasPreviousPage = page > 1;
60 61
                    this.hasNextPage = await this.checkIfNextPage(page, this.certificatesPerPage);
61 62
                }
63
                else {
64
                    this.errorMessage = "Error occurred while loading certificate page.";
65
                    console.error(response.data["data"]);
66
                }
62 67
            } catch (error) {
68
                this.errorMessage = "Error occurred while loading certificate page.";
63 69
                console.log(error);
64 70
            }
65 71
        },
......
119 125
                if (response.data["success"]) {
120 126
                    return response.data["data"].length > 0;
121 127
                }
128
                this.errorMessage = "Error occurred while loading certificate page.";
122 129
                return false;
123 130
            } catch (error) {
131
                this.errorMessage = "Error occurred while loading certificate page.";
132
                console.error(error);
124 133
                return false;
125 134
            }
126 135
        }

Také k dispozici: Unified diff