Skip to content
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

Fix!: Remove JSON parsing error and update detailed report formatting #12

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

pk-zipstack
Copy link
Contributor

What

  • Removed json.loads in extract_error_message to avoid TypeError when processing API responses already in dictionary format.
  • Removed the error message column from the detailed report output.
  • Added a note in the detailed report output to guide users to use the --export_csv argument for accessing error messages.

Why

  • The use of json.loads on a dictionary object caused a TypeError. This change ensures compatibility with API responses that are already deserialized into dictionaries.
  • The error message column cluttered the detailed report output and was not necessary for most use cases. By adding a note, users are now guided to generate a CSV report if they need detailed error information.

How

  • Replaced json.loads(result) with direct usage of the result dictionary in extract_error_message.
  • Updated print_report to exclude the error message column and display a note about the --export_csv option.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why.

  • No. These changes improve usability without altering existing functionality.

@pk-zipstack pk-zipstack requested review from ritwik-g, a team and kirtimanmishrazipstack and removed request for a team December 3, 2024 12:24
main.py Outdated Show resolved Hide resolved
@ritwik-g ritwik-g merged commit ae62f8e into main Dec 4, 2024
2 checks passed
@ritwik-g ritwik-g deleted the csv-bug-fix branch December 4, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants