-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update fix/analytics data export cleanup #3996
Update fix/analytics data export cleanup #3996
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request focus on enhancing error handling and response consistency in the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
src/analytics/api/views/data.py (2)
215-217
: Consider enhancing type hints and variable initializationThe type hints and variable initialization could be improved for better clarity and type safety.
Consider this improvement:
- filter_type: str = None - validated_data: List[str] = None - error_message: str = "" + filter_type: str | None = None + validated_data: List[str] | None = None + error_message: str = ""
195-195
: Remove unnecessary f-string prefixThe error message is static and doesn't contain any placeholders.
Apply this change:
- f"An Error occurred while processing your request. Please contact support.", + "An Error occurred while processing your request. Please contact support.",🧰 Tools
🪛 Ruff (0.8.0)
195-195: f-string without any placeholders
Remove extraneous
f
prefix(F541)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/analytics/api/views/data.py
(5 hunks)
🧰 Additional context used
🪛 Ruff (0.8.0)
src/analytics/api/views/data.py
195-195: f-string without any placeholders
Remove extraneous f
prefix
(F541)
🔇 Additional comments (3)
src/analytics/api/views/data.py (3)
234-236
: LGTM: Clear error message for filter validation
The error message clearly explains the requirement to specify exactly one filter type, which aligns well with the PR's objective of improving error message readability.
253-255
: LGTM: Consistent error message handling
Good use of fallback message when specific validation error is not available.
195-198
: LGTM: Improved security in error handling
Good practice to avoid exposing internal error details in the response while maintaining logging for debugging purposes.
🧰 Tools
🪛 Ruff (0.8.0)
195-195: f-string without any placeholders
Remove extraneous f
prefix
(F541)
thanks @NicholasTurner23 , I am now waiting for the deploy preview to confirm that all is working well. @Codebmk |
@Baalmart I think we have talked about the google auth issue in the preview about 3 or so times. That is what is causing the failure. |
alright @NicholasTurner23 I had forgotten |
Description
[Provide a brief description of the changes made in this PR]
This PR creates a more readable response when the wrong data filter is posted for the data download.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation