diff --git a/src/backend/services/action-error-handler/action-error-handler.ts b/src/backend/services/action-error-handler/action-error-handler.ts index dfaf1bb9a..62ca70c2b 100644 --- a/src/backend/services/action-error-handler/action-error-handler.ts +++ b/src/backend/services/action-error-handler/action-error-handler.ts @@ -51,6 +51,12 @@ const actionErrorHandler = ( const recordJson = record?.toJSON?.(currentAdmin) + if (error instanceof ForbiddenError && recordJson) { + recordJson.params = {} + recordJson.title = '' + recordJson.populated = {} + } + notice = { message: baseMessage, type: 'error',