-
Couldn't load subscription status.
- Fork 3k
Open
Description
Describe the Bug
The error message sent from the beforeDelete hook display correctly in the collection list view, but in the single document view only a generic "Something went wrong." appears and the actual error message is getting swallowed.
Expected behavior: The full error message is displayed for regardless of view (collection/document).
Link to the code that reproduces this issue
branch fix/before-delete-error
Reproduction Steps
- Go to Posts collection list view
- Check the checkbox for Example post
- Hit delete
- See Test Error in toast error
Next
- Open Example Post
- Hit delete
- See error only shows 'Something went wrong.'
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Binaries:
Node: 23.11.0
npm: 10.9.2
Yarn: N/A
pnpm: 9.7.1
Relevant Packages:
payload: 3.61.1
@payloadcms/payload-cloud: 3.61.1
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 10