ContainsPluginError checks if the provided error chain contains a plugin error.
(err error)
| 53 | |
| 54 | // ContainsPluginError checks if the provided error chain contains a plugin error. |
| 55 | func ContainsPluginError(err error) bool { |
| 56 | if err == nil { |
| 57 | return false |
| 58 | } |
| 59 | |
| 60 | var pluginErr *pluginError |
| 61 | return errors.As(err, &pluginErr) |
| 62 | } |
| 63 | |
| 64 | func wrapAsPluginErrorIfNeeded(err error) error { |
| 65 | if err == nil { |
no outgoing calls
no test coverage detected