Skip to content

Return plot create/update validation errors with a 400 status#3202

Merged
jwalgran merged 1 commit intoOpenTreeMap:developfrom
jwalgran:feature/return-api-validation-errors-as-400
Aug 31, 2017
Merged

Return plot create/update validation errors with a 400 status#3202
jwalgran merged 1 commit intoOpenTreeMap:developfrom
jwalgran:feature/return-api-validation-errors-as-400

Conversation

@jwalgran
Copy link
Copy Markdown
Contributor

Previously, validation errors in the plot create and update views were not being
caught, resulting in a 500 error being logged in Rollbar.

Updating these views to properly handle the validation errors required a fix to
the transform_plot_update_dict function to check for the existence of a key
before trying to read it from the plot dict.


Testing

Use a mobile app and attempt to both create and update a tree with zero diameter and verify that the API response has a 400 status code.


Connects to OpenTreeMap/otm-ios#353

Previously, validation errors in the plot create and update views were not being
caught, resulting in a 500 error being logged in Rollbar.

Updating these views to properly handle the validation errors required a fix to
the `transform_plot_update_dict` function to check for the existence of a key
before trying to read it from the plot dict.
@jwalgran jwalgran requested a review from maurizi August 29, 2017 19:11
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.06%) to 83.852% when pulling 89a0c7b on jwalgran:feature/return-api-validation-errors-as-400 into c655bdd on OpenTreeMap:develop.

Copy link
Copy Markdown
Contributor

@maurizi maurizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jwalgran jwalgran merged commit f6e1a68 into OpenTreeMap:develop Aug 31, 2017
@jwalgran jwalgran deleted the feature/return-api-validation-errors-as-400 branch August 31, 2017 05:29
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

Successfully merging this pull request may close these issues.

3 participants