Skip to content

Commit e34a37a

Browse files
committed
fix(coderd): prevent nil err deref
1 parent e8e6dd0 commit e34a37a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/files.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ 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(),
178+
Detail: "",
179179
})
180180
return
181181
}
@@ -192,7 +192,7 @@ func (api *API) fileByID(rw http.ResponseWriter, r *http.Request) {
192192
default:
193193
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
194194
Message: "Unsupported conversion format.",
195-
Detail: err.Error(),
195+
Detail: "",
196196
})
197197
}
198198
}

0 commit comments

Comments
 (0)