0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed missing extra context for Sentry report for editor 404

no issue

- Sentry requires additional data to be passed in under the `extra` property
This commit is contained in:
Kevin Ansfield 2024-09-18 17:43:17 +01:00
parent 48b1b7d504
commit f9bb2d0ba7

View file

@ -662,9 +662,9 @@ export default class LexicalEditorController extends Controller {
// it as saved and performing PUT requests with no id. We want to
// be noisy about this early to avoid data loss
if (isNotFoundError(error)) {
const context = this._getNotFoundErrorContext();
console.error('saveTask failed with 404', context); // eslint-disable-line no-console
Sentry.captureException(error, {tags: {savePostTask: true}, context});
const notFoundContext = this._getNotFoundErrorContext();
console.error('saveTask failed with 404', notFoundContext); // eslint-disable-line no-console
Sentry.captureException(error, {tags: {savePostTask: true}, extra: notFoundContext});
this._showErrorAlert(prevStatus, this.post.status, 'Editor has crashed. Please copy your content and start a new post.');
return;
}