From c1eddef26a857a70e812ad18537e9b65b74c26a6 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 25 Oct 2021 10:38:10 +0200 Subject: [PATCH] core: Use Go's builtin status code property --- pkg/handler/unrouted_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/handler/unrouted_handler.go b/pkg/handler/unrouted_handler.go index 6c5f52b..d0445b6 100644 --- a/pkg/handler/unrouted_handler.go +++ b/pkg/handler/unrouted_handler.go @@ -60,7 +60,7 @@ var ( ErrInvalidUploadLength = NewHTTPError(errors.New("missing or invalid Upload-Length header"), http.StatusBadRequest) ErrInvalidOffset = NewHTTPError(errors.New("missing or invalid Upload-Offset header"), http.StatusBadRequest) ErrNotFound = NewHTTPError(errors.New("upload not found"), http.StatusNotFound) - ErrFileLocked = NewHTTPError(errors.New("file currently locked"), 423) // Locked (WebDAV) (RFC 4918) + ErrFileLocked = NewHTTPError(errors.New("file currently locked"), http.StatusLocked) ErrMismatchOffset = NewHTTPError(errors.New("mismatched offset"), http.StatusConflict) ErrSizeExceeded = NewHTTPError(errors.New("resource's size exceeded"), http.StatusRequestEntityTooLarge) ErrNotImplemented = NewHTTPError(errors.New("feature not implemented"), http.StatusNotImplemented)