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
| Argument | Type | Description |
|---|---|---|
message | string | The message value. |
issues | []operation.Issue | The issues value. |
Returns
The declared result.
errorFull signature
func Reject(
message string,
issues ...operation.Issue,
) errorRelated types
IssueIssue 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.