Skip to content

Commit

Permalink
Use 400 instead of 500 for failing to provide a userpass password.
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Mar 16, 2016
1 parent 0676a34 commit 33c2641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/credential/userpass/path_users.go
Expand Up @@ -166,7 +166,7 @@ func (b *backend) pathUserWrite(
req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
password := d.Get("password").(string)
if req.Operation == logical.CreateOperation && password == "" {
return nil, fmt.Errorf("missing password")
return logical.ErrorResponse("missing password"), logical.ErrInvalidRequest
}
return b.userCreateUpdate(req, d)
}
Expand Down

0 comments on commit 33c2641

Please sign in to comment.