mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: use named loggers in coderd (#8148)
This commit is contained in:
@@ -454,6 +454,10 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
|
||||
}, nil)
|
||||
var bldErr wsbuilder.BuildError
|
||||
if xerrors.As(err, &bldErr) {
|
||||
if bldErr.Status == http.StatusInternalServerError {
|
||||
api.Logger.Error(ctx, "workspace build error", slog.Error(bldErr.Wrapped))
|
||||
}
|
||||
|
||||
httpapi.Write(ctx, rw, bldErr.Status, codersdk.Response{
|
||||
Message: bldErr.Message,
|
||||
Detail: bldErr.Error(),
|
||||
|
||||
Reference in New Issue
Block a user