internal: add HTTPError.Unwrap

This allows callers to access the underlying error via errors.Unwrap.
This commit is contained in:
Simon Ser 2022-05-02 11:23:06 +02:00
parent 25dfbaf95e
commit 8738a105fc

View File

@ -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