Skip to content

docs: add info about custom errors via APIError to hooks overview #13047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codeflorist
Copy link
Contributor

What?

I was searching for info on how to return custom errors in hooks and only came upon this discord answer by Dan Ribbons:
https://payloadcms.com/community-help/github/customize-rest-api-response-in-collection-hooks

Why?

I think this info should be in the docs.

How?

This PR adds a Cusom Error Messages section to the hooks-overview page, detailing the usage of APIError as proposed by Dan Ribbons in the above discord answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant