Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix: make invalid token error message visible while adding external services#60876

Merged
evict merged 6 commits into
sourcegraph:mainfrom
namit-chandwani:fix/external-service-error-handling
Jul 15, 2024
Merged

fix: make invalid token error message visible while adding external services#60876
evict merged 6 commits into
sourcegraph:mainfrom
namit-chandwani:fix/external-service-error-handling

Conversation

@namit-chandwani

Copy link
Copy Markdown
Contributor

Linked Issues

Motivation and Context:

  • To improve the UX by displaying the invalid token error message on the UI to the users while adding a code host connection

Existing Issue Root Cause:

  • After the submit button is clicked while adding a code host connection, the existing code navigates to the /site-admin/external-services/${data.addExternalService.id} page (the page which displays information of the newly added code host connection) before the error message could even be displayed on the current page

Changes Made:

  • Modified the onSubmit function (the one which is called when the submit button is clicked on the code host connection addition page) to only navigate to the /site-admin/external-services/${data.addExternalService.id} page (newly added code host information page) only if no error/warning is returned from the gRPC call which validates the token of the code host added

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (altering code without changing its external behaviour)
  • Documentation change
  • Other

Checklist:

  • Development completed
  • Comments added to code (wherever necessary)
  • Documentation updated (if applicable)
  • Tested changes locally

Follow-up tasks (if any):

  • None

Test Plan

  • Had setup the codebase locally and tested the entire flow locally end-to-end
  • Screen recording which shows the invalid token error message on the UI in the code host connection addition flow:
Screen.Recording.2024-03-06.at.2.26.35.AM.mov

Additional Comments

  • Please let me know if any further changes are required elsewhere

@cla-bot cla-bot Bot added the cla-signed label Mar 5, 2024

@evict evict left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you! I've taken care of the pipelines and asked for an additional review internally. 👍

@namit-chandwani

Copy link
Copy Markdown
Contributor Author

Thank you! I've taken care of the pipelines and asked for an additional review internally. 👍

Awesome! Thanks for the help 🤝

@evict evict merged commit 2b07b4a into sourcegraph:main Jul 15, 2024
@namit-chandwani namit-chandwani deleted the fix/external-service-error-handling branch July 15, 2024 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid Access Token UX is not clear

3 participants