Skip to content

Conversation

Ansters26
Copy link

This pull request addresses the issue where a generic "Unknown error" is shown when a user's mkdocs.yml configuration file is missing. The new behavior provides a clear, actionable error message, consistent with how similar errors are handled for Sphinx.

Fixes: #12378

Problem
-When mkdocs.configuration points to a non-existent file, the build fails with a vague "Unknown problem" message.

-This provides a poor user experience as the root cause of the failure is not obvious.

Solution
-The get_final_doctype method in the BaseMkdocs builder (readthedocs/doc_builder/backends/mkdocs.py) has been updated.

-An os.path.exists() check is now performed to verify that the mkdocs.yml file exists before any attempt is made to read it.

-If the file is not found, a UserFileNotFound exception is raised with a clear error message, instructing the user to check for the missing file.

@Ansters26 Ansters26 requested a review from a team as a code owner October 9, 2025 11:09
@Ansters26 Ansters26 requested a review from stsewd October 9, 2025 11:09
@humitos
Copy link
Member

humitos commented Oct 9, 2025

Hi! Thanks for your PR. We are working together in the PR you linked #12378. There is no need to duplicate work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants