Download this file
| 1 | package release |
| 2 | |
| 3 | // AuthorizationError is a refusal from a caller's Authorize hook. The |
| 4 | // primitives wrap the hook's own error in it so a caller can tell "you may |
| 5 | // not" from a store or ladder failure with errors.As. |
| 6 | // |
| 7 | // The hook runs on a pipeline the primitive has just read (spec |
| 8 | // 2026-10-05-deploy-credential-design.md §7.2): on the ladder's read, on the |
| 9 | // repeat path, and between the pointer read and the conditional write. A |
| 10 | // caller that passes no hook gets no extra reads. |
| 11 | type AuthorizationError struct{ Err error } |
| 12 | |
| 13 | func (e *AuthorizationError) Error() string { return e.Err.Error() } |
| 14 | func (e *AuthorizationError) Unwrap() error { return e.Err } |
| 15 | |