monkey-projects / monkeyci

Next-generation CI/CD tool that uses the full power of Clojure!
https://monkeyci.com
GNU General Public License v3.0
5 stars 0 forks source link

Uniform exception handling #209

Open wneirynck opened 2 months ago

wneirynck commented 2 months ago

There are many exceptions that can be thrown during a build by MonkeyCI. Currently there is no uniform way in how these are treated. By consequence, the can show up all over the place. Sometimes they can be seen in the UI, sometimes only in the logs. We need a way to provide as much information to the frontend as possible, and display it in a uniform manner. Keeping in mind future multilanguage, we should also not strictly rely on the exact error message.

The exceptions can be roughly grouped in these categories:

  1. Job errors: thrown by a single job, solvable by the user
  2. Script errors: thrown by the build script, e.g. compilation issue or runtime bug. Also solvable by the user.
  3. Application errors: caused by a bug in the application code or configuration error. Solvable by us.
  4. Infra errors: e.g. network errors, external service down, too many requests... Usually out of our control.

So errors should be caught as early as possible, categorized and then passed on in a standardized manner so they can be displayed to the user or administrator.