mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added error logging to lexical snippet fix try/catch
no issue - we had a `catch` with no error logging, it shouldn't be hit but it will be useful to know if it does fail
This commit is contained in:
parent
ef096d9c87
commit
abc169329c
1 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import * as Sentry from '@sentry/ember';
|
||||
import ConfirmEditorLeaveModal from '../components/modals/editor/confirm-leave';
|
||||
import Controller, {inject as controller} from '@ember/controller';
|
||||
import DeletePostModal from '../components/modals/delete-post';
|
||||
|
@ -797,6 +798,16 @@ export default class LexicalEditorController extends Controller {
|
|||
} catch (e) {
|
||||
snippet.lexical = null;
|
||||
snippetFixSaves.push(snippet.save());
|
||||
|
||||
console.error(e); // eslint-disable-line no-console
|
||||
|
||||
if (this.config.sentry_dsn) {
|
||||
Sentry.captureException(e, {
|
||||
tags: {
|
||||
lexical: true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue