Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: convert errors.server.controller to typescript utility function #602

Merged
merged 15 commits into from
Nov 10, 2020

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Nov 9, 2020

Reopens #327
Part of #144

@tshuli tshuli force-pushed the refactor/errors-server-controller branch from b23bb20 to 85e0b5b Compare November 9, 2020 08:26
@tshuli tshuli changed the title refactor: errors.server.controller refactor: convert errors.server.controller to typescript utility function Nov 9, 2020
@tshuli tshuli marked this pull request as ready for review November 9, 2020 11:21
@tshuli tshuli requested a review from karrui November 9, 2020 11:21
@tshuli
Copy link
Contributor Author

tshuli commented Nov 9, 2020

@karrui thanks for your earlier review, the comments were really helpful :)

I've made the edits for your re-review

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. Can you create an issue so we can use this utility to generate error strings when creating DatabaseErrors?

something like

return errAsync(
  new DatabaseError(getMongoErrorMessage(error, 'optional default message if needed'))
)

src/app/utils/handle-mongo-error.ts Outdated Show resolved Hide resolved
src/app/utils/handle-mongo-error.ts Show resolved Hide resolved
@tshuli tshuli force-pushed the refactor/errors-server-controller branch from 85e0b5b to 42ecda0 Compare November 10, 2020 06:21
@tshuli tshuli merged commit 0c9e65d into develop Nov 10, 2020
@tshuli tshuli deleted the refactor/errors-server-controller branch November 10, 2020 11:18
@karrui karrui mentioned this pull request Nov 17, 2020
@r00dgirl r00dgirl added this to the typescriptify backend milestone Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants