File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
src/frequenz/client/electricity_trading Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 11# Frequenz Electricity Trading API Client Release Notes
22
3- ## Summary
4-
5- <!-- Here goes a general summary of what this release is about -->
6-
7- ## Upgrading
8-
9- <!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10-
11- ## New Features
12-
13- <!-- Here goes the main new features and examples or instructions on how to use them -->
14-
153## Bug Fixes
164
17- <!-- Here goes notable bug fixes that are worth a special mention or explanation -->
5+ - Fixed list gridpool orders to log an error when an order conversion from protobuf failed and continuing to process other orders.
Original file line number Diff line number Diff line change @@ -639,10 +639,17 @@ async def list_gridpool_orders( # pylint: disable=too-many-arguments
639639 ),
640640 )
641641
642- return [
643- OrderDetail .from_pb (order_detail )
644- for order_detail in response .order_details
645- ]
642+ orders : list [OrderDetail ] = []
643+ for order_detail in response .order_details :
644+ try :
645+ orders .append (OrderDetail .from_pb (order_detail ))
646+ except InvalidOperation :
647+ _logger .error (
648+ "Failed to convert order details for order: %s" ,
649+ str (order_detail ).replace ("\n " , "" ),
650+ )
651+
652+ return orders
646653 except grpc .RpcError as e :
647654 _logger .exception ("Error occurred while listing gridpool orders: %s" , e )
648655 raise e
You can’t perform that action at this time.
0 commit comments