Skip to content
Snippets Groups Projects
Unverified Commit fcd8864f authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix error matching in production build


Webpack renames classes, hence this didn't work in production mode.

Signed-off-by: default avatarChristoph Wurst <christoph@winzerhof-wurst.at>
parent 2e44340d
No related branches found
No related tags found
No related merge requests found
......@@ -168,14 +168,14 @@ export default {
}
} catch (error) {
await matchError(error, {
[MailboxLockedError.name]: async error => {
[MailboxLockedError.getName()]: async error => {
logger.info('Mailbox is locked', {error})
await wait(15 * 1000)
// Keep trying
await this.loadEnvelopes()
},
[MailboxNotCachedError.name]: async error => {
[MailboxNotCachedError.getName()]: async error => {
logger.info('Mailbox not cached. Triggering initialization', {error})
this.loadingEnvelopes = false
......
......@@ -22,7 +22,11 @@
export default class MailboxLockedError extends Error {
constructor(message) {
super(message)
this.name = 'MailboxLockedError'
this.name = MailboxLockedError.getName()
this.message = message
}
static getName() {
return 'MailboxLockedError'
}
}
......@@ -22,7 +22,11 @@
export default class MailboxNotCachedError extends Error {
constructor(message) {
super(message)
this.name = 'MailboxNotCachedError'
this.name = MailboxNotCachedError.getName()
this.message = message
}
static getName() {
return 'MailboxNotCachedError'
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment