async def METHOD_NAME(self):
    self.request.json = async_mock.CoroutineMock()
    self.request.query = {"connection_id": "test"}
    with async_mock.patch.object(
        test_module.web, "json_response"
    ) as mock_response, async_mock.patch.object(
        test_module, "V20DiscoveryExchangeRecord", autospec=True
    ) as mock_ex_rec:
        mock_ex_rec.retrieve_by_connection_id.side_effect = StorageError
        with self.assertRaises(test_module.web.HTTPBadRequest):
            await test_module.query_records(self.request)