calpaterson / csvbase

a simple website for sharing table data - with an API
https://csvbase.com
GNU Affero General Public License v3.0
376 stars 13 forks source link

Invalid row PUTs should raise 4xx, not 500 #113

Closed calpaterson closed 7 months ago

calpaterson commented 7 months ago

Description

Users are getting the API slightly wrong, and we are 500ing

Steps to reproduce

  1. Create a table
  2. PUT a row, but without the row_id key in the dict

Expected result

400, "you're missing the row id"

Actual result

500

Additional details

CSVBASE-25

We should also be clear in the api docs that users are not required to construct their own url key - that is optional

And for now, let's prevent users from editing the row id