payload icon indicating copy to clipboard operation
payload copied to clipboard

Errors given by local api do not match exported errors

Open Arctomachine opened this issue 1 year ago • 0 comments

Link to reproduction

https://github.com/Arctomachine/payload-error-bug-v3

Payload Version

3.0.0-beta.55

Node Version

20.12.2

Next.js Version

15.0.0.-rc.0

Describe the Bug

Errors returned from payload.find and other methods do not match errors exported from payload. In v2 same errors are exported from payload/errors and they match returned errors.

Reproduction Steps

Start server and open home page, look at server console.

Constructor name: NotFound
Instance of NotFound false

Uncomment lines 18 and 19 in page.tsx (override access and user)

Constructor name: Forbidden
Instance of Forbidden false

Adapters and Plugins

No response

Arctomachine avatar Jun 27 '24 14:06 Arctomachine