Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrPayloadFromSingleErr ¶
func ErrPayloadFromSingleErr(principal *models.Principal, err error) *models.ErrorResponse
ErrPayloadFromSingleErr builds a single-message ErrorResponse with the principal's own namespace prefix stripped from err. Pass nil for global callers to leave the message unchanged. A nil err is tolerated and yields fmt's standard "<nil>" rendering rather than panicking, since this helper sits on dozens of REST error paths and a missed err-guard upstream should not crash the handler.
func ErrRestrictionViolation ¶ added in v1.38.0
func ErrRestrictionViolation(principal *models.Principal, err error) *models.RestrictionViolationResponse
restrictionViolationFromErr wraps a non-restriction error into the same RestrictionViolationResponse shape so handlers can return both 422 cases through the same swagger-generated payload type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.