-
Couldn't load subscription status.
- Fork 47
Closed
Description
I was running HttpYak agains a basic local server that was outputting sample HTML/JSON data and noticed that
- mismatching ContentType like
text/htmlfor JSON would cause the extension to raise exception - DocTypes like
<!doctype html />also cause exceptions as pretty printer does not like it
I think both issues are due to the XML parser trowing exceptions:
6.16.0...6.16.1#diff-7f25891c1de6aa3847cf8cb9c1bbf5b6f7e512662b18a71d5a236061a9ed140dR23-R26
const document = parseFromString(
response.body,
utils.isMimeTypeHtml(response.contentType) ? 'text/html' : 'text/xml'
);
Sample Stack Trace:
EG: Not well-formed XML starting with "<!" at position 0 at JI.fatalError (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:157:3567) at LPe (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:155:3388) at nHt (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:154:20087) at MPe.parse (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:154:17785) at KPe.parseFromString (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:157:1165) at rJ (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:280:28801) at Object.beforeLoop (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:280:29556) at Wte.intercept (/Users/<USER>/.vscode/extensions/anweber.vscode-httpyac-6.16.3/dist/extension.js:27:3784) at processTicksAndRejecti...
Platform: MacOS
Version: 6.16.3
Metadata
Metadata
Assignees
Labels
No labels