-
Notifications
You must be signed in to change notification settings - Fork 40
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
🚀 Raise ValueError
if response is empty in CouldForCustomers
source
#900
base: dev
Are you sure you want to change the base?
🚀 Raise ValueError
if response is empty in CouldForCustomers
source
#900
Conversation
Release 0.4.26 PR
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.
Added comments.
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.
please also apply changes for function _to_records_other
@@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
### Fixed | |||
|
|||
### Changed | |||
|
|||
- Changed `CloudForCustomers` methods: `_to_records_report` and `_to_records_other` to rasie ValueError if response from data source is empty |
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.
Description doesn't match with code modification
@@ -90,7 +90,6 @@ def _to_records_report(self, url: str) -> List[Dict[str, Any]]: | |||
records.extend(new_records) | |||
|
|||
url = response_json["d"].get("__next") |
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.
Please consider to use solution from this code:
https://github.com/adrian-wojcik/viadot/blob/a62174515cf0326d1d15e32f151b609522d87b21/viadot/sources/cloud_for_customers.py
ValueError
if response is empty in CouldForCustomers
source
Summary
Adding new logic to raise ValueError with proper message if response from data source is empty
Importance
It is important for debugging process, as now it is more clear what is the issue if reposne will be empty
Checklist
This PR:
CONTRIBUTING.md
CHANGELOG.md