Ardakilic / alerthub

AlertHub is a simple tool written with NodeJS to get alerted from new GitHub and GitLab repository events.
MIT License
200 stars 12 forks source link

Improved errors at startup for problematic config file #90

Open bryanpedini opened 2 months ago

bryanpedini commented 2 months ago

As described a bit in #89, there are two "cryptical" errors shown with an empty or a missing config file, that dive deep into the code / traceback, presumably handled by Node itself. I'm not a Node dev so I can't help on those, but perhaps it would be better to avoid confusion for end users, to catch problematic config files and display human readable errors instead.

I'm not saying to build a parser from scratch and give the line at which the error was found if somebody forgot a comma in the json, but perhaps a categorization of errors such divided:

Or something similar...