Add structured logging and better error handling
This commit is contained in:
1 parent
db4e3c9611
commit
68c7dd76f2
31 files changed
+640
-109
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { api } from "./api.js";
|
||||
import { api, describeError } from "./api.js";
|
||||
import { element } from "./dom.js";
|
||||
import { notificationsEnabled, setNotificationsEnabled } from "./notify.js";
|
||||
|
||||
@@ -77,7 +77,7 @@ async function saveSettings(event, onSaved) {
|
||||
fields.dialog.close();
|
||||
onSaved(data.settings);
|
||||
} catch (error) {
|
||||
fields.error.textContent = error.message;
|
||||
fields.error.textContent = describeError(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user