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

[CORE-268] Improve Consolidated Spend Report error handling #5232

Merged
merged 8 commits into from
Jan 28, 2025

Conversation

calypsomatic
Copy link
Contributor

@calypsomatic calypsomatic commented Jan 24, 2025

Jira Ticket: https://broadworkbench.atlassian.net/browse/CORE-268

Summary of changes:

What

This PR:

  1. Catches any errors from the spend report query, alerting the user to what the error was instead of crashing the entire page.
  2. Discovers any user-owned workspaces that were not included in the spend report, and displays them with N/A values for all spend columns.
  3. Adds a note explaining N/A values and linking to support article for setting up spend reports.

Before:

errornotcaught.mov

After:

errorcaught.mov

Why

Testing strategy

@@ -102,6 +102,8 @@ export interface WorkspaceSpendData {
credits: string;
currency: string;
googleProjectId: string;
endTime?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had included endTime and startTime in my test objects because that's what the real-life WorkspaceSpendData responses included, and it broke the build. It seems like it makes sense to match the actual object, so I've added these fields in as optional

@calypsomatic calypsomatic changed the title catch error [CORE-268] Improve Consolidated Spend Report error handling Jan 28, 2025
@calypsomatic calypsomatic marked this pull request as ready for review January 28, 2025 15:25
@calypsomatic calypsomatic requested a review from a team as a code owner January 28, 2025 15:25
@calypsomatic calypsomatic added this pull request to the merge queue Jan 28, 2025
Merged via the queue into dev with commit ca7c4b4 Jan 28, 2025
11 checks passed
@calypsomatic calypsomatic deleted the core-268-spend-ux branch January 28, 2025 18:44
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.

4 participants