Support Topics Documentation Slack YouTube Blog

Fail to add relation to geopoint via REST API

(Alexander Hartdegen Lee) #1

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.

(Mark Piller) #2

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

(Alexander Hartdegen Lee) #3

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.

(Mark Piller) #4

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>

(Alexander Hartdegen Lee) #5

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.

(Kate Maksimenko) #6

Hi Alexander!

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


(Alexander Hartdegen Lee) #7


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.

(Kate Maksimenko) #8

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