mirror of
https://github.com/coalaura/whiskr.git
synced 2025-12-02 20:22:52 +00:00
small fix for error display
This commit is contained in:
@@ -884,6 +884,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
setError(error) {
|
setError(error) {
|
||||||
|
if (typeof error === "object") {
|
||||||
|
if ("Message" in error) {
|
||||||
|
error = error.Message;
|
||||||
|
} else {
|
||||||
|
error = JSON.stringify(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.#error = error || "Something went wrong";
|
this.#error = error || "Something went wrong";
|
||||||
|
|
||||||
this.#_message.classList.add("errored", "has-text");
|
this.#_message.classList.add("errored", "has-text");
|
||||||
|
|||||||
Reference in New Issue
Block a user