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

🪟 🐛 Fix error message with missing docs #17071

Merged
merged 2 commits into from
Sep 23, 2022
Merged

🪟 🐛 Fix error message with missing docs #17071

merged 2 commits into from
Sep 23, 2022

Conversation

timroes
Copy link
Collaborator

@timroes timroes commented Sep 23, 2022

What

This reimplements the reverted #17014 but with a flipped logic for the content-type.

Fixes an error where if a markdown doesn't exist for an internal documentation will actually show part of our HTML instead:

cloud airbyte io_workspaces_bed3b473-1518-4461-a37f-730ea3d3a848_connections

How

This happened because if the markdown doesn't exist we actually (thanks to being a SPA) deliver our HTML instead. We had a check so far that checked if the response contained <!DOCTYPE html> and if so treat it as an error and show no documentation found. The problem was, that after minification this became <!doctype html> (lower case), and such the check didn't work anymore.

I've changed this logic a bit to actually check if the content-type after loading the documentation is actually not text/html (which is the case if the markdown isn't found and instead it delivers our index.html), and if not throw actually and show the "Documentation not found" error instead. You can currently test this with the "Google Firestore" destination, which does not have a valid Markdown documentation.

@timroes timroes requested a review from a team as a code owner September 23, 2022 00:22
@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Sep 23, 2022
Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

Unable to test locally as I am getting the correct headers with OSS or Cloud. I think this fixes the previous issue as it's explicitly checking for content-type text/html which the previous error state was not.

@timroes timroes merged commit d4b7f4e into master Sep 23, 2022
@timroes timroes deleted the tim/doc-fix branch September 23, 2022 17:48
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
* Fix error message with missing docs (airbytehq#17014)

* Reverse type check logic
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* Fix error message with missing docs (airbytehq#17014)

* Reverse type check logic
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants