fix: vite fatals on receiving HTTP4xx (#7306)

* fix: vite fatals on receiving HTTP4xx

* tune Vite

* fmt

* rewrite

* fmt
This commit is contained in:
Marcin Tojek
2023-04-27 19:04:24 +02:00
committed by GitHub
parent ed1b33acd6
commit 77d9937dc4
3 changed files with 73 additions and 1 deletions

View File

@ -26,7 +26,7 @@ func parseUUID(rw http.ResponseWriter, r *http.Request, param string) (uuid.UUID
parsed, err := uuid.Parse(rawID)
if err != nil {
httpapi.Write(r.Context(), rw, http.StatusBadRequest, codersdk.Response{
Message: fmt.Sprintf("Invalid UUID %q.", param),
Message: fmt.Sprintf("Invalid UUID %q.", rawID),
Detail: err.Error(),
})
return uuid.UUID{}, false