function

Reject

Reject stops an operation from a collection, global, or field hook with a message for the person who made the request. The admin shows the message, and REST, the SDK, and the Local API return it as a "rejected" error (HTTP 422). Any other error from a hook is reported as an internal failure whose message stays on the server.

Arguments

ArgumentTypeDescription
messagestringThe message value.
issues[]operation.IssueThe issues value.

Returns

The declared result.

error

Full signature

func Reject( message string, issues ...operation.Issue, ) error

Source core/reject.go:22

Related types

  • Issue

    Issue addresses the current field or a descendant relative to its candidate value. A zero Target selects the current field. Ridu supplies resource, field, locale, display-path and stable correlation information; callbacks never construct occurrence IDs.