csvbase icon indicating copy to clipboard operation
csvbase copied to clipboard

Creating a new table with the same name as one of your existing ones gets a 500

Open calpaterson opened this issue 3 years ago • 4 comments

Description

If you already have a table called "X" and try to paste a new "X" you get a 500

Steps to reproduce

  1. Upload a table called "X"
  2. Upload a table called "X"

Expected result

Some kind of 4xx response (ideally with the suggestion to upsert!)

Actual result

500 response

Additional details

calpaterson avatar Jan 19 '23 12:01 calpaterson

This happened to me yesterday when I attempted to replace Galaxy/Ships, do you find these bugs by looking at logs?

Wingysam avatar Jan 19 '23 17:01 Wingysam

Yep, I look at logs and at the dashboard of a third party service that records crashes. And yes - this bug is an anonymised version of what you ran into :)

calpaterson avatar Jan 20 '23 09:01 calpaterson

Can there be some way to replace all data in a table at once in bulk?

Wingysam avatar Jan 20 '23 20:01 Wingysam

Aha yes, that functionality already exists via the API in a semi-undocumented fashion:

curl -n https://csvbase.com/calpaterson/example | vipe | curl -n https://csvbase.com/calpaterson/example -X PUT --data-binary @-

-n means you need to put your username/apikey in ~/.netrc eg:

machine csvbase.com
  login calpaterson
  password aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

And vipe is available in the moreutils package.

But yes, it needs to be accessible via the web UI and I've just filed that as https://github.com/calpaterson/csvbase/issues/35

calpaterson avatar Jan 20 '23 21:01 calpaterson