ForbiddenWithInternal creates a new error that will return a simple "forbidden" to the client, logging internally the more detailed message provided.
(internal error, subject Subject, action policy.Action, object Object, output rego.ResultSet)
| 54 | // "forbidden" to the client, logging internally the more detailed message |
| 55 | // provided. |
| 56 | func ForbiddenWithInternal(internal error, subject Subject, action policy.Action, object Object, output rego.ResultSet) *UnauthorizedError { |
| 57 | return &UnauthorizedError{ |
| 58 | internal: internal, |
| 59 | subject: subject, |
| 60 | action: action, |
| 61 | object: object, |
| 62 | output: output, |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func (e UnauthorizedError) Unwrap() error { |
| 67 | return e.internal |
no outgoing calls