You can extend the default PocketBase behavior with custom server-side code using the exposed JavaScript app level hooks.

Throwing an error or returning false inside a hook handler function stops the hook execution chain.