mrWh1te / Botmation

A simple TypeScript framework for declaratively composing bots with Puppeteer
https://botmation.dev
MIT License
18 stars 2 forks source link

Improve code by replacing silent errors #90

Open mrWh1te opened 3 years ago

mrWh1te commented 3 years ago

Multiple instances in the code capture errors and provides safe fallbacks. This will increase debug work as the source of errors is obscure. This issue is in favor of changing the code to fail loudly. This will help devs find the source of the bug quicker

https://github.com/mrWh1te/Botmation/blob/5e07b5032793254cae425a06ac84102b16b2f1b6/src/botmation/actions/indexed-db.ts#L61

Determine a standard practice then document it:

mrWh1te commented 3 years ago

When it comes to Errors, the only standard set in this library is that you ONLY catch errors by using the errors()() BotAction

TBD: Beyond that, logging of errors and warnings is to be handled either by the BotAction's themselves or through the errors() BotAction.