Skip to content

Commit 0647ec1

Browse files
authored
fix(coderd): prevent nil err deref (#12475)
1 parent dc69341 commit 0647ec1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

coderd/files.go

-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ func (api *API) fileByID(rw http.ResponseWriter, r *http.Request) {
175175
if file.Mimetype != codersdk.ContentTypeTar {
176176
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
177177
Message: "Only .tar files can be converted to .zip format",
178-
Detail: err.Error(),
179178
})
180179
return
181180
}
@@ -192,7 +191,6 @@ func (api *API) fileByID(rw http.ResponseWriter, r *http.Request) {
192191
default:
193192
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
194193
Message: "Unsupported conversion format.",
195-
Detail: err.Error(),
196194
})
197195
}
198196
}

0 commit comments

Comments
 (0)