Edit

throw Abort()

Environment: server.

Use throw Abort() to implement permissions and other guards, see Guides > Permissions.

Abort is Telefunc's way of identifying expected errors, and passing error data to the client. Other errors (e.g., throw new Error()) are treated as unexpected (bugs), see throw Abort() vs throw new Error().

You can also call throw Abort(someValue) for implementing getContext() wrappers, see Guides > Permissions > getContext() wrapping.

See also