mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
internal: add HTTPError.Unwrap
This allows callers to access the underlying error via errors.Unwrap.
This commit is contained in:
parent
25dfbaf95e
commit
8738a105fc
@ -100,6 +100,10 @@ func (err *HTTPError) Error() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (err *HTTPError) Unwrap() error {
|
||||||
|
return err.Err
|
||||||
|
}
|
||||||
|
|
||||||
// DAVError is a XML error with HTTP status and a human readable message
|
// DAVError is a XML error with HTTP status and a human readable message
|
||||||
type DAVError struct {
|
type DAVError struct {
|
||||||
Code int
|
Code int
|
||||||
|
Loading…
Reference in New Issue
Block a user