Fix error values

This commit is contained in:
Neil Alexander 2021-07-29 13:13:10 +01:00
parent 6e56dbc566
commit 870c09be03
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -96,6 +96,7 @@ func (a *KeyInternalAPI) PerformUploadDeviceKeys(ctx context.Context, req *api.P
if !hasMasterKey { if !hasMasterKey {
res.Error = &api.KeyError{ res.Error = &api.KeyError{
Err: "No master key was found, either in the database or in the request!", Err: "No master key was found, either in the database or in the request!",
IsMissingParam: true,
} }
return return
} }
@ -130,7 +131,6 @@ func (a *KeyInternalAPI) PerformUploadDeviceKeys(ctx context.Context, req *api.P
if err != nil { if err != nil {
res.Error = &api.KeyError{ res.Error = &api.KeyError{
Err: fmt.Sprintf("The JSON of the key section is invalid: %s", err.Error()), Err: fmt.Sprintf("The JSON of the key section is invalid: %s", err.Error()),
IsMissingParam: true,
} }
return return
} }