@mbtest/mountebank 2.9.3-beta.9590 → 2.9.3-beta.9664

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbtest/mountebank",
3
- "version": "2.9.3-beta.9590",
3
+ "version": "2.9.3-beta.9664",
4
4
  "author": "Brandon Byars <brandon.byars@gmail.com>",
5
5
  "description": "Over the wire test doubles",
6
6
  "homepage": "http://www.mbtest.dev",
@@ -66,10 +66,10 @@ function nodeValue (node) {
66
66
  * @returns {Object}
67
67
  */
68
68
  function select (selector, ns, possibleXML, logger) {
69
- const DOMParser = xmlDom.DOMParser,
69
+ const warn = logger?.warn || (() => {}),
70
+ DOMParser = xmlDom.DOMParser,
70
71
  parser = new DOMParser({
71
72
  onError: (level, message) => {
72
- const warn = (logger || {}).warn || (() => {});
73
73
  warn('%s (source: %s)', message, JSON.stringify(possibleXML));
74
74
  }
75
75
  });
@@ -80,6 +80,7 @@ function select (selector, ns, possibleXML, logger) {
80
80
  }
81
81
  catch (e) {
82
82
  // Invalid XML, return undefined to indicate no match
83
+ warn('XML parsing error: %s (source: %s)', e.message, JSON.stringify(possibleXML));
83
84
  return undefined;
84
85
  }
85
86