spectral icon indicating copy to clipboard operation
spectral copied to clipboard

Uncaught exception with incomplete paths

Open Thomasdezeeuw opened this issue 1 year ago • 0 comments

Describe the bug Spectral has an uncaught exception:

Error running Spectral!
Error #1: Function "operationSummary_1$1" threw an exception: Cannot read properties of null (reading 'summary')
          at lintNode    …nner/lintNode.js:30  throw new pony_caus…
          at cb          …runner/runner.js:45  (0, lintNode_1.lint…
          at <computed>  …runner/runner.js:93  cb(scope);
          at <computed>  …oxy-callbacks.js:31  fn(...args);
          at emit        …untime/scope.js:109  return void fn(_rol…

To Reproduce

Using a path without any info, for example one you still have to write:

paths:
  /users:
    get:
      # TODO.

Run spectral lint it will fail.

Expected behavior

A (linting) error, but not an uncaught exception.

Environment (remove any that are not applicable):

  • Library version: 6.3.0
  • OS: N/A
  • Browser: N/A

Additional context

Should be low priority, but would be nice to get a decent error message.

Thomasdezeeuw avatar Sep 12 '22 09:09 Thomasdezeeuw