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 #17014

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Conversation

timroes
Copy link
Collaborator

@timroes timroes commented Sep 21, 2022

What

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 text/markdown (which is what we expect and treat the response as), 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 21, 2022 23:41
@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Sep 21, 2022
@timroes timroes changed the title Fix error message with missing docs 🪟 🐛 Fix error message with missing docs Sep 21, 2022
Copy link
Contributor

@teallarson teallarson left a comment

Choose a reason for hiding this comment

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

Code lgtm. Did not test but saw it in action.

@timroes timroes merged commit e931b69 into master Sep 22, 2022
@timroes timroes deleted the tim/missing-doc-fix branch September 22, 2022 14:19
krishnaglick added a commit that referenced this pull request Sep 22, 2022
krishnaglick added a commit that referenced this pull request Sep 22, 2022
timroes added a commit that referenced this pull request Sep 23, 2022
timroes added a commit that referenced this pull request Sep 23, 2022
* Fix error message with missing docs (#17014)

* Reverse type check logic
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
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
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
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