Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85158502
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 0b4825ca08..bc86cb1e44 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -467,6 +467,11 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
// "Plugins are only applied to stores created after the plugins themselves, and after pinia is passed to the app, otherwise they won't be applied."
app.use(pinia)
+ app.config.errorHandler = (error, instance, info) => {
+ console.error('GLOBAL ERROR HANDLER', error, instance, info)
+ useInterfaceStore().setGlobalError({ error, instance, info })
+ }
+
const waitForAllStoresToLoad = async () => {
// the stores that do not persist technically do not need to be awaited here,
// but that involves either hard-coding the stores in some place (prone to errors)
diff --git a/src/stores/interface.js b/src/stores/interface.js
index 21c1e9f8aa..4d5d2a8e45 100644
--- a/src/stores/interface.js
+++ b/src/stores/interface.js
@@ -58,6 +58,7 @@ export const useInterfaceStore = defineStore('interface', {
},
layoutType: 'normal',
globalNotices: [],
+ globalError: null,
layoutHeight: 0,
lastTimeline: null,
foreignProfileBackground: null,
@@ -176,6 +177,9 @@ export const useInterfaceStore = defineStore('interface', {
removeGlobalNotice(notice) {
this.globalNotices = this.globalNotices.filter((n) => n !== notice)
},
+ setGlobalError(data) {
+ this.globalError = data
+ },
pushGlobalNotice({
messageKey,
messageArgs = {},
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jun 28, 6:01 AM (8 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1630709
Default Alt Text
(1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment