Skip to content

Commit

Permalink
worker: updat error message
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Mar 5, 2024
1 parent f51fc98 commit 906bcc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 906bcc8

Please sign in to comment.