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

dest: Destination display error handling #3779

Merged
merged 17 commits into from
Apr 2, 2024

Conversation

mastercactapus
Copy link
Member

Description:
Fixes error handling with the new destination API. Namely, it prevents the entire page from breaking (e.g., the escalation policy details page) if any single action is invalid (e.g., archived or invalid slack channel). Instead individual chips/line items will render an error.

The purpose is to ensure in such an event, a user is able to interact with the page and take action to resolve the issue.

  • gql typescript generator tool was updated to support GraphQL unions

Screenshots:

Escalation Policy Details

TODAY
image

This PR
image
image

User Contact Methods

TODAY
image

This PR
image

Schedule On-Call Notifications

TODAY
image

This PR
image
image

Describe any introduced user-facing changes:
N/A fixing broken behavior

Describe any introduced API changes:
!! Breaking changes to the destination's API !!

  • FieldValuePair no longer contains label and isFavorite these were moved to FieldSearchResult to separate the two
  • Destination.displayInfo return type changed from DestinationDisplayInfo to a union of DestinationDisplayInfo and DestinationDisplayInfoError -- rather than failing the entire query with a global error, errors are now returned inline
  • destinationFieldSearch return type changed to FieldSearchConnection, which was renamed from FieldValueConnection to match FieldSearchResult

Additional Info:
The affected APIs are only used when the dest-types experimental flag is enabled.

@mastercactapus mastercactapus changed the title Dest display error handling dest: Destination display error handling Mar 28, 2024
Copy link
Collaborator

@ethan-haynes ethan-haynes left a comment

Choose a reason for hiding this comment

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

Doesn't have to be a part of this PR, but maybe we should write some additional tests to catch this type of behavior from happening with other areas we are making changes in.

@ethan-haynes ethan-haynes merged commit 6213568 into master Apr 2, 2024
7 checks passed
@ethan-haynes ethan-haynes deleted the dest-display-error-handling branch April 2, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants