I've been using the plugin, and noticed that it doesn't seem possible to properly catch errors thrown within the source async function to allow for a graceful exit with this.error if something goes wrong. No error message is printed either, and calling this.error inside the async function doesn't work either.
Is there something I missed?
Example code:
try {
await inquirer
.prompt([
{
type: "autocomplete",
name: "test",
message: "Will quit",
source: async () => { throw Error() },
},
])
.catch(() => console.log("This is never printed"));
} finally {
console.log("This is never printed");
}
I've been using the plugin, and noticed that it doesn't seem possible to properly catch errors thrown within the
sourceasync function to allow for a graceful exit withthis.errorif something goes wrong. No error message is printed either, and callingthis.errorinside the async function doesn't work either.Is there something I missed?
Example code: