Skip to content

Fix error handling for unavailable schemas - #1370

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-1367
Oct 20, 2026
Merged

datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-1367

Conversation

@shin19991207

Copy link
Copy Markdown
Member

What does this PR do?

When an HTML error page contained "parse", YLS treated it as a schema parsing error and tried downloading the schema again. If that download failed, the error was not caught.
This PR fixes to:

  • use the content already available in loadJSONSchema() to report the line and column of parsing errors
  • show HTTP errors for direct and VS Code requests, without including the error page's HTML
  • show a schema-load warning and return an empty hover when the schema cannot be loaded

What issues does this PR fix or reference?

Fixes #1367

Is it tested? How?

  • Regression tests by Codex
  • Manually tested the cases reported in the issue

Signed-off-by: Morgan Chang <shin19991207@gmail.com>

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixes the problem for me and looks good. Thanks, Morgan!

@datho7561
datho7561 merged commit 391b060 into redhat-developer:main Oct 20, 2026
4 checks passed
@shin19991207
shin19991207 deleted the fix-1367 branch October 21, 2026 17:26
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.

Schema that 404's causes to

2 participants