PhilanthropyDataCommons / service

A project for collecting and serving public information associated with grant applications
GNU Affero General Public License v3.0
8 stars 2 forks source link

Use Error Code 422 When Referenced Resources Don't Exist #1034

Open hminsky2002 opened 1 month ago

hminsky2002 commented 1 month ago

This commit distinguishes creation errors when referenced resources don't exist by using the error code 422, whereas before both unique id AND foreign key errors were covered by the error code 409. It also updates the openapi spec to match these changes.

Closes Issue #827

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.57%. Comparing base (4cc6a41) to head (dfef3be). Report is 8 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1034 +/- ## ======================================= Coverage 88.57% 88.57% ======================================= Files 129 129 Lines 1724 1724 Branches 213 213 ======================================= Hits 1527 1527 Misses 197 197 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.