Skip to content

Conversation

@paula-stacho
Copy link
Collaborator

Description

We didn't show any error info in the bulk delete and bulk update toasts. This was particularly confusing in case of network errors (as reported in COMPASS-8529).

We already show error messages with other operations (e.g. when find fails), so I am adding the message in these toasts. Additionally, we use a different description for network errors.

Example - operation timeout (low maxTimeMS)

Screenshot 2025-07-07 at 17 42 52

Example - lost connection timeout

Screenshot 2025-07-07 at 17 43 37

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings July 7, 2025 15:45
@paula-stacho paula-stacho requested a review from a team as a code owner July 7, 2025 15:45
@github-actions github-actions bot added the fix label Jul 7, 2025
@github-actions github-actions bot added the fix label Jul 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR surfaces error messages in bulk delete and update toasts, distinguishing network errors with custom titles.

  • Pass the caught error into bulk failure toast calls from the store
  • Update toast components to set titles and descriptions based on error type
  • Extend unit tests to cover both generic and network error scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/compass-crud/src/stores/crud-store.ts Forward error object to openBulk*FailureToast calls
packages/compass-crud/src/components/bulk-actions-toasts.tsx Add error prop, detect MongoNetworkError, display message
packages/compass-crud/src/components/bulk-actions-toasts.spec.tsx Update tests to pass error and assert on both titles and messages

@paula-stacho paula-stacho merged commit 6d79312 into main Jul 8, 2025
59 checks passed
@paula-stacho paula-stacho deleted the COMPASS-8529 branch July 8, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants