Error returns the redacted public error string.
()
| 28 | |
| 29 | // Error returns the redacted public error string. |
| 30 | func (e *AutonomyError) Error() string { |
| 31 | if e == nil { |
| 32 | return "<nil>" |
| 33 | } |
| 34 | if e.Err == nil { |
| 35 | return fmt.Sprintf("task: autonomy lease rejected: %s", e.Reason) |
| 36 | } |
| 37 | return fmt.Sprintf("task: autonomy lease rejected: %s: %s", e.Reason, e.Err.Error()) |
| 38 | } |
| 39 | |
| 40 | // Unwrap returns the wrapped task-domain sentinel. |
| 41 | func (e *AutonomyError) Unwrap() error { |
no outgoing calls