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

Error page for 400 response #365

Closed
csc-jm opened this issue Jun 30, 2021 · 3 comments · Fixed by #386
Closed

Error page for 400 response #365

csc-jm opened this issue Jun 30, 2021 · 3 comments · Fixed by #386
Assignees
Labels
backend backend issue enhancement New feature or request

Comments

@csc-jm
Copy link
Contributor

csc-jm commented Jun 30, 2021

Proposed solution

Currently the user can produce faulty requests, in which case the backend responds with 400 BadRequest. An example of this is requesting: /objects/study?page=asdf (page query parameter needs to be a number)

However, there is no specified error page for these situations and the frontend seems to instead direct to the 500 error page. Thus, a 400 error page should be added that informs the user what went wrong with the request.

DoD (Definition of Done)

A bad request results in a comprehensive status code 400 error page and includes error details.

Testing

Unit, integration, e2e

@csc-jm csc-jm added the enhancement New feature or request label Jun 30, 2021
@blankdots
Copy link
Contributor

blankdots commented Jun 30, 2021

maybe instead of an actual error page, more suitable would be a snackbar. The idea is not to interrupt the user flow if it happens in the middle of an wizard action. The thought process here is that 401, 403 and 500 pages reflect actions or scenarios that are breaking for the user process, while 400 a bad request should not be like that.

@blankdots
Copy link
Contributor

We can 404 instead of 500 page and snackbar when API calls are made (this last part should be done).

@lilachic lilachic self-assigned this Jul 5, 2021
@blankdots blankdots added the backend backend issue label Jul 12, 2021
@blankdots
Copy link
Contributor

this redirect happens in the backend

@blankdots blankdots linked a pull request Jul 26, 2021 that will close this issue
3 tasks
@blankdots blankdots self-assigned this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend issue enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants