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

Missing error handling in Data type microservice #104

Open
LaChapeliere opened this issue Oct 16, 2020 · 4 comments
Open

Missing error handling in Data type microservice #104

LaChapeliere opened this issue Oct 16, 2020 · 4 comments

Comments

@LaChapeliere
Copy link
Contributor

Bug description

I'm not entirely certain because I was not able to test it, but I believe the Data type microservice is missing some error handling in data_type_handler.py
For example, if one tries to cast "Hello world" into a float Python will return an error, but there's nothing to catch that error.

Expected result

Either replace the un-castable values by None, or abort the Data type command?

Actual result

Crash?

@riibeirogabriel
Copy link
Member

Nop, there are a treatment in each microservice to respond mishandled requests, in this case is returned a bad request error, do you think which is necessary add all response errors in docs?

@riibeirogabriel
Copy link
Member

And sorry to respond after 6 days, i didn't see the github notification.

@LaChapeliere
Copy link
Contributor Author

Nop, there are a treatment in each microservice to respond mishandled requests, in this case is returned a bad request error, do you think which is necessary add all response errors in docs?
I think it's not urgent to add the response errors to the docs, but it should be done at some point.
Also, the more info you give people in the error message, the better. Does the "bad request error" include a detailed message. In the case I pointed out, you should tell the user that the error is because they tried a cast that's not allowed.

@riibeirogabriel
Copy link
Member

when a bad request is accomplished, also is returned a message informating the error with the bad request status (406), in data type handler. There are the "invalid_fields", "invalid_filename" and "missing_fields" messages in DataTypeHandlerRequestValidator class, i think which errors responses already are implemented by each microservices, the user will be informed what is the error in case of bad request.

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

No branches or pull requests

2 participants