Move json errors over to gmsl (#3080)

This commit is contained in:
devonh 2023-05-09 22:46:49 +00:00 committed by GitHub
parent a49c9f01e2
commit 0489d16f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 808 additions and 1217 deletions

View file

@ -141,8 +141,8 @@ func (r *Admin) PerformAdminEvacuateRoom(
Asynchronous: true,
}
inputRes := &api.InputRoomEventsResponse{}
err = r.Inputer.InputRoomEvents(ctx, inputReq, inputRes)
return affected, err
r.Inputer.InputRoomEvents(ctx, inputReq, inputRes)
return affected, nil
}
// PerformAdminEvacuateUser will remove the given user from all rooms.
@ -334,9 +334,7 @@ func (r *Admin) PerformAdminDownloadState(
SendAsServer: string(r.Cfg.Matrix.ServerName),
})
if err = r.Inputer.InputRoomEvents(ctx, inputReq, inputRes); err != nil {
return fmt.Errorf("r.Inputer.InputRoomEvents: %w", err)
}
r.Inputer.InputRoomEvents(ctx, inputReq, inputRes)
if inputRes.ErrMsg != "" {
return inputRes.Err()