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

Exceptions are not returned to the client #9

Open
GrigoriiBerezin opened this issue Apr 1, 2022 · 2 comments
Open

Exceptions are not returned to the client #9

GrigoriiBerezin opened this issue Apr 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@GrigoriiBerezin
Copy link
Collaborator

GrigoriiBerezin commented Apr 1, 2022

Problem:
We have cases, when errors are happened, but the client will se only that something goes wrong without any error information to avoid it in future and simply understand what's going on. Let's think about error handler to let clients know about the mistakes that they were made.

Solution:
We must add error handler to make returning errors info possible. (ExceptionHandler docs)
I don't know, it should be discussed with @myazinn, but I think, we should have exception handler for each service.

Steps to reproduce:

  1. Create user by using signUp endpoint (localhost:8088/auth/v1/signUp)
  2. Try to create another user using the same email

Actual result:
Response with 500 status and "There was an internal server error." message

Expected result:
Json response with 500 status and body like
{ "message": "error message" } (should also be discussed with @myazinn)

@GrigoriiBerezin GrigoriiBerezin added the bug Something isn't working label Apr 1, 2022
@DruzhininPavel
Copy link

I think it should be the 409 error "Resource already exist" or something like this, because 500 it is Internal server error, it happense when server is down or when it is the critical error.

@GrigoriiBerezin
Copy link
Collaborator Author

Yep, probably. We should define error ADT for every server and than mapping them to statuses as we did on cromwell-pipeline

@GrigoriiBerezin GrigoriiBerezin changed the title "fix": Exceptions are not returned to the client Exceptions are not returned to the client Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants