diff options
author | Ryan W <twentybitdev@gmail.com> | 2021-09-08 17:31:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 17:31:03 +0100 |
commit | a624eab309ee6ee7b3540dfba884a42c9a4f4ad9 (patch) | |
tree | 92ec39ba2d0f512891dcb20635ee9bc660b45b18 /userapi/internal/api.go | |
parent | 7dc8fb1fe780888d5758bf665949e9e09d21e56a (diff) |
- Removed double imports (#1989)
- Lower cased error messages
Signed-off-by: Ryan Whittington <twentybitdev@gmail.com>
Co-authored-by: kegsay <kegan@matrix.org>
Diffstat (limited to 'userapi/internal/api.go')
-rw-r--r-- | userapi/internal/api.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/userapi/internal/api.go b/userapi/internal/api.go index 518edef4..4ff8f51d 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -177,10 +177,10 @@ func (a *UserInternalAPI) deviceListUpdate(userID string, deviceIDs []string) er DeviceKeys: deviceKeys, }, &uploadRes) if uploadRes.Error != nil { - return fmt.Errorf("Failed to delete device keys: %v", uploadRes.Error) + return fmt.Errorf("failed to delete device keys: %v", uploadRes.Error) } if len(uploadRes.KeyErrors) > 0 { - return fmt.Errorf("Failed to delete device keys, key errors: %+v", uploadRes.KeyErrors) + return fmt.Errorf("failed to delete device keys, key errors: %+v", uploadRes.KeyErrors) } return nil } @@ -242,10 +242,10 @@ func (a *UserInternalAPI) PerformDeviceUpdate(ctx context.Context, req *api.Perf OnlyDisplayNameUpdates: true, }, &uploadRes) if uploadRes.Error != nil { - return fmt.Errorf("Failed to update device key display name: %v", uploadRes.Error) + return fmt.Errorf("failed to update device key display name: %v", uploadRes.Error) } if len(uploadRes.KeyErrors) > 0 { - return fmt.Errorf("Failed to update device key display name, key errors: %+v", uploadRes.KeyErrors) + return fmt.Errorf("failed to update device key display name, key errors: %+v", uploadRes.KeyErrors) } } return nil |