mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
internal: check for response error in Multistatus.Get
This commit is contained in:
parent
6e0ea58de1
commit
d8ce7d353d
@ -71,7 +71,7 @@ func (ms *Multistatus) Get(href string) (*Response, error) {
|
||||
resp := &ms.Responses[i]
|
||||
for _, h := range resp.Hrefs {
|
||||
if h == href {
|
||||
return resp, nil
|
||||
return resp, resp.Status.Err()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,6 +121,7 @@ func IsMissingProp(err error) bool {
|
||||
}
|
||||
|
||||
func (resp *Response) DecodeProp(v interface{}) error {
|
||||
// TODO wrap errors with more context (XML name)
|
||||
name, err := valueXMLName(v)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user