Support Topics Documentation Slack YouTube Blog

Fail to add relation to geopoint via REST API

I was trying to add a geopoint with a relation to an User object:

Then, I encountered a weird issue whereby I got an error code 36 (Duplicate entry with Column “myuser”).
Prior, I had cleared all the geopoints in my database. Any advice on why this is happening would be appreciated.

Do you get the error when add a geopoint and the geolocation storage is completely empty?

When I first tried, the geolocation was filled with the sample data generated by the server. I still got the error after I cleared all my geopoints in the geolocation storage.

Here’s a CURL request I just tried:

curl -H application-id:MYAPPID -H secret-key:MYRESTKEY -X PUT “{“myuser”%3A%20{"___class"%20%3A%20"Users"%2C%20"objectId"%3A"5B103644-3577-56AE-FF85-DCC9B1AD1A00"}}&categories=test

Ran it twice, got two points:</img>

Yah, I tried it on a new app and it works. But it does not work on the app which I am working on right now.

Hi Alexander!

Could you check if you use correct objectId in previous request?



yes, I just checked. My bad, the objectId was in fact wrong.

A side note, the error message could have been clearer.

Anyway, thanks for the replies.

You are right.
We will make it to more informative.