emersion / go-webdav

A Go library for WebDAV, CalDAV and CardDAV
MIT License
326 stars 71 forks source link

Add exported function to create `HTTPError` #73

Closed bitfehler closed 2 years ago

bitfehler commented 2 years ago

This can be used by backends to influence the status code returned to clients for errors that occurred in the backend.

bitfehler commented 2 years ago

As discussed on IRC. For now, I don't see the need to expose this type at all. Maybe the client code could wrap (or convert) this (and potentially other errors it might encounter) into its own type and export that instead?

emersion commented 2 years ago

Thanks!