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

Validation errors returned via flowapi are difficult to debug #1055

Closed
maxalbert opened this issue Jul 9, 2019 · 0 comments · Fixed by #1056
Closed

Validation errors returned via flowapi are difficult to debug #1055

maxalbert opened this issue Jul 9, 2019 · 0 comments · Fixed by #1056
Labels
development FlowAPI Issues related to the FlowKit API FlowMachine Issues related to FlowMachine

Comments

@maxalbert
Copy link
Contributor

maxalbert commented Jul 9, 2019

When parameter validation of query parameters fails (and also if there is some internal error in flowmachine), an error message will be propagated up through flowapi. However, currently this often doesn't contain enough information to debug the issue without setting debugging breakpoints inside flowmachine and intercepting the execution.

Here is an example error message received by flowclient:

flowclient.client.FlowclientConnectionError: Something went wrong. API returned with status code 400. Error message: 'Parameter validation failed.'. Payload: {'0': {'locations': {'0': {'aggregation_unit': ['Must be one of: admin0, admin1, admin2, admin3.']}}, 'metric': {'0': {'reference_location': {'0': {'aggregation_unit': ['Must be one of: admin0, admin1, admin2, admin3.']}}}}}}

It would be good if this mentioned the input parameters for which validation fails, and also printed the dictionaries in a more readable fashion.

@maxalbert maxalbert added FlowMachine Issues related to FlowMachine FlowAPI Issues related to the FlowKit API development labels Jul 9, 2019
@maxalbert maxalbert changed the title Error messages returned via flowapi are difficult to debug Validation errors returned via flowapi are difficult to debug Jul 9, 2019
@mergify mergify bot closed this as completed in #1056 Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development FlowAPI Issues related to the FlowKit API FlowMachine Issues related to FlowMachine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant