Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: generalize password invalid message
  • Loading branch information
aqandrew committed Aug 11, 2025
commit a323ebd1710b5505a96a92a11a4690291dbfd6bf
4 changes: 2 additions & 2 deletions coderd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) {
err = userpassword.Validate(createUser.Password)
if err != nil {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Password not strong enough!",
Message: "Password is invalid",
Validations: []codersdk.ValidationError{{
Field: "password",
Detail: err.Error(),
Expand Down Expand Up @@ -448,7 +448,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) {
err = userpassword.Validate(req.Password)
if err != nil {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Password not strong enough!",
Message: "Password is invalid",
Validations: []codersdk.ValidationError{{
Field: "password",
Detail: err.Error(),
Expand Down
Loading