plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

Catch invalid value types for registry modifications #981

Closed pfreixes closed 4 years ago

pfreixes commented 4 years ago

When a new value for a specific registry is provided and the framework complains that the type is not valid return a 412 instead of returning a generic 500 error

pfreixes commented 4 years ago

@bloodbare yeps already signed, CHANGELOG.md updated.

pfreixes commented 4 years ago

Fixed conflict issue. PTAL @bloodbare @masipcat

codecov-commenter commented 4 years ago

Codecov Report

Merging #981 into master will increase coverage by 0.1%. The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #981     +/-   ##
========================================
+ Coverage    94.6%   94.6%   +0.1%     
========================================
  Files         316     316             
  Lines       28045   28047      +2     
========================================
+ Hits        26512   26518      +6     
+ Misses       1533    1529      -4     
Impacted Files Coverage Δ
guillotina/api/registry.py 88.7% <100.0%> (+2.9%) :arrow_up:
guillotina/tests/test_api.py 99.6% <100.0%> (+0.1%) :arrow_up:
guillotina/json/deserialize_value.py 90.7% <0.0%> (+0.7%) :arrow_up: