Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

🐛 BUG: Frontend uses wrong error message #572

Closed
1 of 2 tasks
PatrickSkowronek opened this issue Apr 6, 2018 · 3 comments · Fixed by #615
Closed
1 of 2 tasks

🐛 BUG: Frontend uses wrong error message #572

PatrickSkowronek opened this issue Apr 6, 2018 · 3 comments · Fixed by #615
Assignees
Labels
bug This Issue describes a unwanted behavior good first issue For a new Member web-frontend All frontend related issues

Comments

@PatrickSkowronek
Copy link
Collaborator

PatrickSkowronek commented Apr 6, 2018

User Story

As a:

User

I want:

The correct Error message!

At the moment there are two components where the old error will be printed, which is not defined any more.
-> https://github.com/h-da/geli/blob/9084ceab25e751729311066835f3a633b177751c/app/webFrontend/src/app/unit/code-kata-unit/code-kata-unit.component.ts#L83
-> https://github.com/h-da/geli/blob/9084ceab25e751729311066835f3a633b177751c/app/webFrontend/src/app/auth/register/register.component.ts#L80

There are properly even more, which are didn't crash yet.

Acceptance criteria:

  • Fix the two components(code-kata & register)
  • Search for more occurrences and fix them

Additional info:

A occurrence was fixed in #520
Sentry Issue ID: STAGING-4P

Please tag this issue if you are sure to which tag(s) it belongs.

@PatrickSkowronek PatrickSkowronek added bug This Issue describes a unwanted behavior web-frontend All frontend related issues good first issue For a new Member labels Apr 6, 2018
@kesselb kesselb self-assigned this Apr 12, 2018
@wurmc wurmc self-assigned this Apr 12, 2018
@kesselb
Copy link
Contributor

kesselb commented Apr 12, 2018

I added a first pull request for a few occurences. But there are still enough left for @wurmc. I would like to ask @PatrickSkowronek & @HPunktOchs about: https://github.com/h-da/geli/blob/497c95f1cd60602a5718cad6b0d65f3324fa06c1/app/webFrontend/src/app/course/course-edit/general-tab/general-tab.component.ts#L145-L146

It looks like there are two kind of errors. First one is the (now broken) call for BadRequestError. Second one is for?

The logic is not for mongoos. When you add a maxlength for name to api/src/models/Course.ts and try to create a new course with name "12345" you run into a ValidationError (and there is no errmsg property).

@PatrickSkowronek
Copy link
Collaborator Author

@danielkesselberg at the moment there is no error code in this function https://github.com/h-da/geli/blob/280a27ea721bf0dd6f3cde66b33cb3b0e277dee1/api/src/controllers/CourseController.ts#L595 . You need to add the error handling here as well. If findOne fails it send the validation error automatically.

@d89
Copy link
Collaborator

d89 commented Apr 18, 2018

Did not find any occurrence of an invalid error message yet 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This Issue describes a unwanted behavior good first issue For a new Member web-frontend All frontend related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants