Return 400 instead of 500 if generic backend is written to without data.
Fixes #825
This commit is contained in:
parent
8699adbbb0
commit
900b3d8882
|
@ -97,6 +97,8 @@ generate them, leading to client errors.
|
|||
* secret/generic: Validate given duration at write time, not just read time;
|
||||
if stored durations are not parseable, return a warning and the default
|
||||
duration rather than an error [GH-718]
|
||||
* secret/generic: Return 400 instead of 500 when `generic` backend is written
|
||||
to with no data fields [GH-825]
|
||||
* secret/postgresql: Revoke permissions before dropping a user or revocation
|
||||
may fail [GH-699]
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ func (b *PassthroughBackend) handleWrite(
|
|||
req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
|
||||
// Check that some fields are given
|
||||
if len(req.Data) == 0 {
|
||||
return nil, fmt.Errorf("missing data fields")
|
||||
return logical.ErrorResponse("missing data fields"), nil
|
||||
}
|
||||
|
||||
// Check if there is a ttl key; verify parseability if so
|
||||
|
|
Loading…
Reference in New Issue