-
Notifications
You must be signed in to change notification settings - Fork 10
Update delivery time checks for gridpool streams and support delivery time filter in CLI #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
15c4ca0
8afcc93
b5fa0fb
8408b94
98c3731
cdf4013
40646c7
1192df5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -300,8 +300,10 @@ def gridpool_orders_stream( | |||||||||||
|
|
||||||||||||
| Raises: | ||||||||||||
| grpc.RpcError: If an error occurs while streaming the orders. | ||||||||||||
| ValueError: If an invalid delivery_time_filter is provided. | ||||||||||||
| """ | ||||||||||||
| self.validate_params(delivery_time_filter=delivery_time_filter) | ||||||||||||
| if delivery_time_filter and not delivery_time_filter.is_valid: | ||||||||||||
| raise ValueError("Invalid delivery_time_filter provided.") | ||||||||||||
|
|
||||||||||||
| gridpool_order_filter = GridpoolOrderFilter( | ||||||||||||
| order_states=order_states, | ||||||||||||
|
|
@@ -366,8 +368,10 @@ def gridpool_trades_stream( | |||||||||||
|
|
||||||||||||
| Raises: | ||||||||||||
| grpc.RpcError: If an error occurs while streaming gridpool trades. | ||||||||||||
| ValueError: If an invalid delivery_time_filter is provided. | ||||||||||||
| """ | ||||||||||||
| self.validate_params(delivery_time_filter=delivery_time_filter) | ||||||||||||
| if delivery_time_filter and not delivery_time_filter.is_valid: | ||||||||||||
| raise ValueError("Invalid delivery_time_filter provided.") | ||||||||||||
|
||||||||||||
| raise ValueError("Invalid delivery_time_filter provided.") | |
| raise ValueError( | |
| "Invalid delivery_time_filter: please ensure that the start time " | |
| "is before the end time and that all required fields are set." | |
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message "Invalid delivery_time_filter provided." is not very informative about what makes the filter invalid. Consider providing a more descriptive error message that explains the validation failure, such as "Invalid delivery_time_filter: end time must be after start time" to help users understand and fix the issue.