{"modulePath":"github.com/nitrictech/nitric","version":"v0.21.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\n## Functions\n\n```go\nfunc As(err error, target any) bool\n```\n\n```go\nfunc Code(e error) codes.Code\n```\nCode - returns a nitric api error code from an error or Unknown if the error was not a nitric api error\n\n```go\nfunc Is(err error, target error) bool\n```\n\n## Types\n\n```go\ntype ErrorFactory = func(c codes.Code, msg string, cause error) error\n```\n\n```go\nfunc ErrorsWithScope(scope string, args map[string]interface{}) ErrorFactory\n```\nErrorsWithScope - Returns a new reusable error factory with the given scope\n\n```go\ntype PluginError struct {\n\tCode   codes.Code\n\tMsg    string\n\tCause  error\n\tPlugin string\n\tArgs   map[string]interface{}\n}\n```\n\n```go\nfunc (p *PluginError) Error() string\n```\n\n```go\nfunc (p *PluginError) Unwrap() error\n```\n\n","path":"github.com/nitrictech/nitric/pkg/plugins/errors","name":"errors","synopsis":"","isRedistributable":true}
