Closed ezequieltejada closed 3 years ago
I understand that the errors shown by Linter would be solved by changing
.catch((err: any) => reject({status: 500, data: { message: 'Internal Server Error !', err }})); to
.catch((err: any) => reject(err));
If that's the case, "err" should be typed as an Error object, and an Error should be thrown where is needed. Please let me know and I'll refactor each "catch"
Issue implement in #10 PR
Now that there is a Linter, a couple of problems came up.
The first one is this one:
Expected the Promise rejection reason to be an Error.eslint(prefer-promise-reject-errors)
That can be found in multiple places where a Promise is rejected with anything besides an Error.