carddav: return HTTP 501 error instead of panicing

This commit is contained in:
Simon Ser 2024-02-07 17:26:50 +01:00
parent 12d8b4bf62
commit 20fad80dff

View File

@ -720,11 +720,11 @@ func (b *backend) Mkcol(r *http.Request) error {
} }
func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) { func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) {
panic("TODO") return false, internal.HTTPErrorf(http.StatusNotImplemented, "carddav: Copy not implemented")
} }
func (b *backend) Move(r *http.Request, dest *internal.Href, overwrite bool) (created bool, err error) { func (b *backend) Move(r *http.Request, dest *internal.Href, overwrite bool) (created bool, err error) {
panic("TODO") return false, internal.HTTPErrorf(http.StatusNotImplemented, "carddav: Move not implemented")
} }
// https://tools.ietf.org/rfcmarkup?doc=6352#section-6.3.2.1 // https://tools.ietf.org/rfcmarkup?doc=6352#section-6.3.2.1