From 906bcc8295ed6f788c2e28c6f4eaf0c2b026654e Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 5 Mar 2024 18:43:35 +0100 Subject: [PATCH] worker: updat error message --- worker/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/worker.go b/worker/worker.go index 91786c481..729c544c7 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -870,7 +870,7 @@ func (w *worker) objectsHandlerHEAD(jc jape.Context) { // parse path path := jc.PathParam("path") if path == "" || strings.HasSuffix(path, "/") { - jc.Error(fmt.Errorf("directories are not accepted"), http.StatusBadRequest) + jc.Error(errors.New("HEAD requests can only be performed on objects, not directories"), http.StatusBadRequest) return }