mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
internal: don't send an empty error element
According to RFC 4918 section 14.5, the error element can't be empty.
This commit is contained in:
parent
3f8b212b0d
commit
d8a8af0448
@ -143,9 +143,7 @@ func NewErrorResponse(path string, err error) *Response {
|
||||
}
|
||||
|
||||
var errElt *Error
|
||||
if !errors.As(err, &errElt) {
|
||||
errElt = &Error{}
|
||||
}
|
||||
errors.As(err, &errElt)
|
||||
|
||||
href := Href{Path: path}
|
||||
return &Response{
|
||||
|
Loading…
Reference in New Issue
Block a user