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

🪟 🎉 Show an error when OAuth credentials are missing #19466

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

timroes
Copy link
Contributor

@timroes timroes commented Nov 16, 2022

What

Closes #17143

Show a toast notification in case the get_consent_url returns a 404, which means that the database has no OAuth credentials for this connector. This is a problem that needs to be solved by the connector team. Also track a Datadog error for this, that we can build alerting on top of.

We show a different error when running in dev mode (npm start), that gives more hints towards that it's a more normal situation there and we just never have enabled this OAuth connector in that given environment.

Best to be reviewed with "Ignore whitespaces".

@timroes timroes requested a review from lmossman November 16, 2022 09:17
@timroes timroes requested a review from a team as a code owner November 16, 2022 09:17
@octavia-squidington-iv octavia-squidington-iv added the area/platform issues related to the platform label Nov 16, 2022
Copy link
Contributor

@josephkmh josephkmh left a comment

Choose a reason for hiding this comment

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

Didn't test locally. Code looks good, but I did have one question about switching the data fetching method.

notificationService.registerNotification({
id: "oauthConnector.credentialsMissing",
// Since it's dev only we don't need i18n on this string
title: "OAuth is not enabled for this connector on this environment.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity - do we have any OAuth connectors enabled in dev mode? From this message it sounds like some are enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you can find the (internal) documentation to what we have enabled on frontend-dev here: https://www.notion.so/Testing-OAuth-Locally-fea17aeb14c74cacb5f3ed856daae753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform team/extensibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show error message if OAuth data is missing
3 participants