fix(coderd): prevent nil err deref (#12475)

This commit is contained in:
Cian Johnston 2024-03-11 14:03:58 +00:00 committed by GitHub
parent dc69341583
commit 0647ec1960
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 2 deletions

View File

@ -175,7 +175,6 @@ func (api *API) fileByID(rw http.ResponseWriter, r *http.Request) {
if file.Mimetype != codersdk.ContentTypeTar {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Only .tar files can be converted to .zip format",
Detail: err.Error(),
})
return
}
@ -192,7 +191,6 @@ func (api *API) fileByID(rw http.ResponseWriter, r *http.Request) {
default:
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Unsupported conversion format.",
Detail: err.Error(),
})
}
}