lbovet / typson

Converts TypeScript to JSON-schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid input script path logs error but doesn't reject promise

keego opened this issue · comments

When attempting to create a schema from a file that doesn't exist, an ENOENT: no such file or directory error is logged to the console but isn't thrown. This prevents API consumers from being able to differentiate cases based on whether or not the input file path is valid, and forces consumers to verify all input paths beforehand. If this is the desired behavior, it would be nice to at least have this option configurable so that all errors can be handled by the consumer on a case-by-case basis.