Commit Graph
7 Commits
Author SHA1 Message Date
BlackMagiq a12ae350a7 Merge branch 'main' into feat/error-handling 2022-12-24 20:34:55 -05:00
Hüseyin Berke Bütün 28818db757 refactor: Prefer use of RequestError and next() function on middlewares
Added:
- New error types such as `IntegrationNotFoundError`,
  `WorkspaceNotFoundError`, `AccountNotFoundError' and more.

Refactored:
- Refactored most of the middlewares and very little number of helper
  functions to use RequestError
- Deleted unused imports

Changed:
- Some of the error types in middlewares changed to more related error
  types.
- Environment variable of 'VERBOSE_ERROR_OUTPUT' changed to more
  reliable validation method in `config/index.ts` as per @dangtony98
  requested.
2022-12-24 20:52:26 +01:00
Tuan Dang 3f2d011fba Update contributing dev docs and envars, remove PUBLIC_KEY, PRIVATE_KEY server envar requirement 2022-12-22 13:36:15 -05:00
Hüseyin Berke Bütün bd9041a62c feat: Add central error handler
Added:
- Added Midleware to capture and handle all errors
    - will catch error from `throw ...` and `next(...)`
- Added RequestError base error class to build consistent error objects
- Added common errors like `UnauthorizedRequestError`, `BadRequestError`
- Added consistent Logging solution using `winston`
    - Supports Loki Transporter using `winston-loki`
- Outputing Legal disclaimer to console when `TELEMETRY_ENABLED=true`

Changed:
- Changed console.log to getLogger() favor of using consistent logging
2022-12-22 00:55:41 +01:00
Tuan Dang 547555591b Refactor integrations logic and replace hardcoded client ids with envars 2022-12-18 12:18:50 -05:00
Tuan Dang 896760903a Refactor envars for easier self-hosting 2022-11-20 22:54:38 -05:00
Maidul Islam bea0ff6e05 Add frontend, backend and CLI 2022-11-17 17:54:35 -05:00