{"modulePath":"github.com/GitHub/git-lfs","version":"v1.5.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\nPackage errors provides common error handling tools NOTE: Subject to change, do not rely on this package from outside git-lfs source\n\n## Functions\n\n```go\nfunc Context(err error) map[string]interface{}\n```\nErrorContext returns the context map for an error if it is a wrappedError. If it is not a wrappedError it will return an empty map.\n\n```go\nfunc DelContext(err error, key string)\n```\nErrorDelContext removes a value from the error's context. If the error has not been wrapped, it does nothing.\n\n```go\nfunc Errorf(format string, args ...interface{}) error\n```\nErrorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called.\n\n```go\nfunc GetContext(err error, key string) interface{}\n```\nErrorGetContext gets a value from the error's context. If the error has not been wrapped, it returns an empty string.\n\n```go\nfunc IsAuthError(err error) bool\n```\nIsAuthError indicates the client provided a request with invalid or no authentication credentials when credentials are required (e.g. HTTP 401).\n\n```go\nfunc IsBadPointerKeyError(err error) bool\n```\nIsBadPointerKeyError indicates that the parsed data has an invalid key.\n\n```go\nfunc IsCleanPointerError(err error) bool\n```\nIsCleanPointerError indicates an error while cleaning a file.\n\n```go\nfunc IsDownloadDeclinedError(err error) bool\n```\nIsDownloadDeclinedError indicates that the smudge operation should not download. TODO: I don't really like using errors to control that flow, it should be refactored.\n\n```go\nfunc IsFatalError(err error) bool\n```\nIsFatalError indicates that the error is fatal and the process should exit immediately after handling the error.\n\n```go\nfunc IsNotAPointerError(err error) bool\n```\nIsNotAPointerError indicates the parsed data is not an LFS pointer.\n\n```go\nfunc IsNotImplementedError(err error) bool\n```\nIsNotImplementedError indicates the client attempted to use a feature the server has not implemented (e.g. the batch endpoint).\n\n```go\nfunc IsRetriableError(err error) bool\n```\nIsRetriableError indicates the low level transfer had an error but the caller may retry the operation.\n\n```go\nfunc IsSmudgeError(err error) bool\n```\nIsSmudgeError indicates an error while smudging a files.\n\n```go\nfunc New(message string) error\n```\nNew returns an error with the supplied message. New also records the stack trace at thepoint it was called.\n\n```go\nfunc NewAuthError(err error) error\n```\n\n```go\nfunc NewBadPointerKeyError(expected, actual string) error\n```\n\n```go\nfunc NewCleanPointerError(pointer interface{}, bytes []byte) error\n```\n\n```go\nfunc NewDownloadDeclinedError(err error, msg string) error\n```\n\n```go\nfunc NewFatalError(err error) error\n```\n\n```go\nfunc NewNotAPointerError(err error) error\n```\n\n```go\nfunc NewNotImplementedError(err error) error\n```\n\n```go\nfunc NewRetriableError(err error) error\n```\n\n```go\nfunc NewSmudgeError(err error, oid, filename string) error\n```\n\n```go\nfunc SetContext(err error, key string, value interface{})\n```\nErrorSetContext sets a value in the error's context. If the error has not been wrapped, it does nothing.\n\n```go\nfunc StackTrace(err error) []string\n```\n\n```go\nfunc StandardizeBadPointerError(err error) error\n```\nIf an error is abad pointer error of any type, returns NotAPointerError\n\n```go\nfunc Wrap(err error, msg string) error\n```\nWrap wraps an error with an additional message.\n\n```go\nfunc Wrapf(err error, format string, args ...interface{}) error\n```\nWrapf wraps an error with an additional formatted message.\n\n","path":"github.com/GitHub/git-lfs/errors","name":"errors","synopsis":"Package errors provides common error handling tools NOTE: Subject to change, do not rely on this package from outside git-lfs source","isRedistributable":true}
