Unhelpful API response when setting a link row field with duplicate IDs

I was writing a data import script today and made a mistake in my code causing it to try to create rows in Baserow that had the same row ID multiple times in a link row field. I had no idea that was the issue at first, though, because the only error I got back from the Baserow API was “Server Error (500)”. But after fixing the duplicate IDs issue, this 500 error no longer occurred.

To save others the same confusion I had, I think it would be helpful if the API returned a 400 error telling the user they had duplicate IDs and in which field.

Usually, when you have a 500 it’s more than just a meaning of not showing up the error in the API call, it might be an actual runtime error on the backend.
It can of course be just a way of hiding the real issue (for security purposes). :+1:t2:

Meanwhile, every time you do have a 500 it basically means that you should check the logs on the backend. You cannot always expose everything happening on the server to your front end.

If it does have an unhandled error, it may require a fix on our side for sure!
Do you by any chance have the error on the backend in case of a duplicate? :smiley:

Huh, well I tried pulling down the latest version of Baserow and tried to replicate the error, and passing in duplicate IDs worked fine. We are still running Baserow 1.13 on our servers, so maybe this was already fixed and we just need to update.

1 Like