WebDAV error with HTTP status code mapping.
Backend and lock store callbacks return {:error, %Davy.Error{}} to signal
failures. The code atom maps to an HTTP status code via status_code/1.
code is a closed union — a code with no status_code/1 clause is a
Dialyzer error rather than a silent 500 at runtime.
Summary
Functions
Returns the HTTP status code for the given error code atom.
Types
@type error_code() ::
:bad_gateway
| :bad_request
| :conflict
| :failed_dependency
| :forbidden
| :insufficient_storage
| :internal_error
| :locked
| :method_not_allowed
| :not_found
| :precondition_failed
| :range_not_satisfiable
| :request_entity_too_large
| :service_unavailable
| :unauthorized
| :unsupported_media_type
@type t() :: %Davy.Error{code: error_code(), message: String.t() | nil}
Functions
@spec status_code(error_code()) :: pos_integer()
Returns the HTTP status code for the given error code atom.