-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Better error handling for tech-docs when folder or mkdocs.yml is missing #3660
Comments
Sweet! Thanks for listing multiple cases of improved error messages |
Looks like this type of error is trapped by the techdocs-common stages generator helpers class: backstage/packages/techdocs-common/src/stages/generate/helpers.ts Lines 233 to 240 in a22fc19
There are other good catch functions in there. Somehow I think those should catch, warn, and then throw a custom error specific to the type of issue. If done, then they could be caught up in the UI in |
We have a user who was quite confused by this today so adding my +1. The logs do have some extra information which is helpful, but it is not exposed to the user.
I suggest that |
Totally. We have been waiting for So, yes agree with you @dtuite that TechDocs should allow both
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For Beta release we should consider
|
Let's come back to this after #6341 and (to a lesser extent) mkdocs/mkdocs#2478 are in. |
^ MkDocs PR was merged, but it's not released yet. This PR is related to the update we'll need to do though: backstage/mkdocs-techdocs-core#27 |
The better error-handling or messages there are the less confused users of backstage we'll have.
Right now when the folder
docs
or the filemkdocs.yml
is missing or namedmkdocs.yaml
ot gets cryptic error messages like this one.Failed to generate docs from /tmp/backstage-YEeOfY into /tmp/techdocs-tmp-t8WrEp with error undefined
Right now users seem to believe that this is due to backstage being buggy instead of having incorrect data in their repos.
Most of these can be solved by some simple precondition-checks in the folder where the project is cloned to.
Expected Behavior
Missing docs folder:
Precondition:
Message:
Missing mkdocs.yml:
Precondition
Message
Incorrectly named
mkdocs.yaml
Optionally it would be possible to rename mkdocs.yaml to mkdocs.yml in the cloned folder.
Precondition
Message
Current Behavior
Errors like this are returned in the browser, while the message in the backend logs are a little better.
Failed to generate docs from /tmp/backstage-YEeOfY into /tmp/techdocs-tmp-t8WrEp with error undefined
Possible Solution
Use preconditions on folder before attempting to run mkdocs.
Context
Less confused users mean more and happy users!
The text was updated successfully, but these errors were encountered: