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.
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