Skip to content

Commit

Permalink
fix: fix ForbiddenError returning information about record
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Aug 27, 2024
1 parent 6ab01b5 commit db76fb3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit db76fb3

Please sign in to comment.