Hüseyin Berke Bütün
22d6aa8e46
fix: Fixed wrong naming for error handler middleware
2022-12-24 21:45:53 +01:00
Hüseyin Berke Bütün
6216f70950
chore: Split error handler middleware to a seperate file
2022-12-24 21:43:02 +01: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
Hüseyin Berke Bütün
843757fcf5
fix: Wrong error handler middleware position
...
Error handler is a middleware that captures errors from throw and
next(...), so in order to be able to handle it needs to come after
all of the routing and other middlewares. Previously it was before
routuing logic and wasn't working, now it works as intended.
Also added check for LogLevel to Sentry for not sending false-positive
errors like `BadRequestError`, `UnauthorizedRequestError` and etc.
2022-12-22 17:51:53 +01:00
Hüseyin Berke Bütün
6f5d7a831b
refactor: Refactored middlewares to use RequestError
...
Refactored middlewares to use RequestError rather than using
`try {...}catch (err){...}`. With this change it's possible to manage
all error details within one place.
Added:
- Added Sentry.captureException to Error Handler
2022-12-22 01:42:02 +01: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
Reginald Bondoc
95b8d27c59
Merge branch 'main' of github.com:reginaldbondoc/infisical
2022-12-21 20:33:14 +01:00
Reginald
5790af7b8b
Merge branch 'Infisical:main' into main
2022-12-21 20:32:59 +01:00
Reginald Bondoc
a3609b9b6f
Align with comments
2022-12-21 20:32:38 +01:00
Tuan Dang
78a52422a2
Patch Netlify integration cases, add new docs for Heroku, Vercel, and Netlify
2022-12-21 01:55:23 -05:00
Reginald
4aaa01fb0e
Clean up
2022-12-20 20:39:55 +01:00
Reginald
7eedefa0c9
Update app.ts
2022-12-20 01:17:04 +01:00
Reginald Bondoc
bd207dc65f
Merge branch 'main' of github.com:reginaldbondoc/infisical
2022-12-20 01:04:33 +01:00
Reginald Bondoc
fc906e7dc7
Setup test, break apart entrypoint, & align GHA workflow
2022-12-20 00:56:53 +01:00
Tuan Dang
2d77fe9ca3
Fix lint issues
2022-12-19 12:05:19 -05:00
Tuan Dang
c15a9301af
Temp disable healthcheck
2022-12-18 19:16:56 -05:00
Tuan Dang
200bb12ad8
Move CLIENT_ID envars to be fetched from backend for (cloud) integration options
2022-12-18 16:10:58 -05:00
Tuan Dang
547555591b
Refactor integrations logic and replace hardcoded client ids with envars
2022-12-18 12:18:50 -05:00
Tuan Dang
6c7d232a9e
Fix merge conflicts for index
2022-12-15 15:31:14 -05:00
Tuan Dang
35fd1520e2
Add integration auth revocation
2022-12-15 15:27:01 -05:00
Tuan Dang
787e54fb91
Finish Netlify integration v1 full-loop
2022-12-14 18:18:21 -05:00
Tuan Dang
f3900213b5
Add telemetry output at backend container start
2022-12-13 21:59:12 -05:00
Tuan Dang
fe17d8459b
Begin Netlify integration
2022-12-13 21:12:40 -05:00
Maidul Islam
c33b043f5f
remove cookie path temporary
2022-12-13 18:54:45 -05:00
Tuan Dang
1a3d3906da
Change jid path
2022-12-13 16:25:19 -05:00
Tuan Dang
d86c335671
Begin Netlify integration
2022-12-13 15:47:27 -05:00
Tuan Dang
62f0b3f6df
Patch EMAIL_TOKEN_LIFETIME expiring early
2022-12-13 15:22:07 -05:00
Tuan Dang
3e623922b4
Preliminary Vercel integration
2022-12-13 13:59:21 -05:00
Vladyslav Matsiiako
07bb3496e7
Added the account recovery flow
2022-12-12 20:42:16 -05:00
Reginald Bondoc
bcd18ab0af
Ignore linting healthcheck & exclue in rate-limiting
2022-12-12 19:11:44 +01:00
Reginald
1ea75eb840
Merge branch 'Infisical:main' into main
2022-12-12 18:15:13 +01:00
Tuan Dang
dd05e2ac01
Merge branch 'main' of https://github.com/Infisical/infisical into bot
2022-12-12 10:58:26 -05:00
Tuan Dang
c6c2cfaaa5
Continue trimming frontend integration page and renaming variables
2022-12-12 10:36:13 -05:00
Tuan Dang
6f90064400
Add required backup key return fields for GET backup key
2022-12-12 08:31:20 -05:00
Tuan Dang
10d57e9d88
Modularize integrations into json files, continue refactoring integrations frontend
2022-12-12 00:23:13 -05:00
Tuan Dang
182db69ee1
Merge branch 'main' of https://github.com/Infisical/infisical into bot
2022-12-11 17:06:23 -05:00
Reginald Bondoc
752ebaa3eb
Add healthchecks and test image before push
2022-12-11 22:36:46 +01:00
mv-turtle
8896e1232b
Merge pull request #114 from Infisical/account-recovery
...
Begin reset password backend functionality
2022-12-11 14:55:54 -05:00
Tuan Dang
bacf9f2d91
Fix merge conflicts frontend integrations
2022-12-11 11:45:47 -05:00
seunghyunOh
c4b4829694
Linting
2022-12-11 15:07:53 +09:00
Tuan Dang
6f682250b6
Begin reset password backend functionality
2022-12-10 23:06:54 -05:00
Tuan Dang
e2a84ce52e
Merge branch 'main' of https://github.com/Infisical/infisical into bot
2022-12-10 17:00:10 -05:00
Reginald Bondoc
6b546034f4
Use Sentry instead of console logs
2022-12-10 22:05:19 +01:00
Tuan Dang
c2eaea21f0
Modify frontend to be compatible with full-loop for bot-based integrations
2022-12-10 15:43:22 -05:00
Reginald Bondoc
da999107f3
Add local SMTP server for development
2022-12-10 21:10:05 +01:00
Tuan Dang
a58f91f06b
Merge branch 'main' of https://github.com/Infisical/infisical into bot
2022-12-09 13:23:52 -05:00
Tuan Dang
9f82220f4e
Remove frontend/backend sync operation for envars to integrations in favor of bot
2022-12-09 10:59:54 -05:00
Tuan Dang
3d25baa319
Add parseInt to token expiration
2022-12-09 10:10:38 -05:00
Tuan Dang
a763d8b8ed
Delete actions folder
2022-12-08 23:55:33 -05:00
Tuan Dang
d4e0a4992c
Merge branch 'main' of https://github.com/Infisical/infisical into bot
2022-12-08 23:27:08 -05:00