Error: 1017 "Invalid where clause with api" param "includemetadata=true"

Hi,
I’m having some issues with the “includemetadata” api param. Just playing around with the sample data and trying to request it using this param and things work fine when it’s set to false, but I’m getting an error when set to true. Not doing anything fancy and I reviewed the api doc carefully but can’t really seem to point my finger to what’s going on
https://api.backendless.com/***/***/geo/rect?nwlat=39.72518735793395&nwlon=-124.34404492378235&selat=35.04572964609489&selon=-119.82395511120556&categories=geoservice_sample&includemetadata=false
[{"objectId":"6E11CBCD-6501-3A5B-FF79-C51E77069600","categories":["geoservice_sample"],"latitude":37.31917,"longitude":-122.27417,"___class":"GeoPoint"},{"objectId":"A02E4F24-9C9C-2C02-FFDE-17C221EA5000","categories":["geoservice_sample"],"latitude":37.33939,"longitude":-121.89496,"___class":"GeoPoint"},{"objectId":"0551A486-8861-644D-FF02-DBCC6C65AF00","categories":["geoservice_sample"],"latitude":37.35411,"longitude":-121.95524,"___class":"GeoPoint"},{"objectId":"D742A00A-BBCB-779F-FF38-D3F6CEF5ED00","categories":["geoservice_sample"],"latitude":37.36883,"longitude":-122.03635,"___class":"GeoPoint"},{"objectId":"D871E395-9BB6-B426-FFBB-1E4432010D00","categories":["geoservice_sample"],"latitude":37.38605,"longitude":-122.08385,"___class":"GeoPoint"},{"objectId":"7693B23D-0010-E33B-FF24-FAE899270800","categories":["geoservice_sample"],"latitude":37.70215,"longitude":-121.93579,"___class":"GeoPoint"},{"objectId":"A4C016AF-7160-2856-FF90-F3A2ED364E00","categories":["geoservice_sample"],"latitude":37.77493,"longitude":-122.41942,"___class":"GeoPoint"},{"objectId":"5C17BFE0-4521-CD8B-FF59-5485126D4000","categories":["geoservice_sample"],"latitude":38.58157,"longitude":-121.4944,"___class":"GeoPoint"}]
https://api.backendless.com/***/***/geo/rect?nwlat=39.72518735793395&nwlon=-124.34404492378235&selat=35.04572964609489&selon=-119.82395511120556&categories=geoservice_sample&includemetadata=true
-> “{“code”:1017,“message”:“Invalid where clause”,“errorData”:{}}”

Hi Buen,

Can you please also provide your app ID so we could do the testing as close as possible?

Hey Sergey, here we go: 4CD8100F-3D9A-C94E-FF20-8FEE38E3E100

Hi Buen

It’s a misbehavior which we’ll fix asap. I’ve created an internal task to fix it, for your reference it’s ID is BKNDLSS-17435. We’ll notify you as soon as the fix will be available. Sorry for the inconvenience

Hello again,

The problem has been fixed. It was caused by you having added a metadata item with a key “". Since metadatas are the column names for a GeoPoint table under the hood, it resulted in an invalid query, since "” is an illegal name for the column.
To prevent this in the future we’re going to add the validation for the metadata columns.
Thanks for reporting!

That makes sense, thanks a lot for your help, I can confirm this seems resolved on my end.

Cheers,
Ben

I am seeing this issue too

If i do a post to {{API Host}}/{{Application ID}}/{{REST API Key}}/data/{{Table Name}}/{{Data Object ID}}/{{Data Relation Name}}

with a body like

{“objectId” : “94A40363-5Z7E-F774-FF87-B64760001A00”}

in postman it works

but in a fetch request within my app i get a response of

Response {
[23:24:31] “_bodyInit”: “{“code”:1017,“message”:“Invalid where clause”,“errorData”:{}}”,
[23:24:31] “_bodyText”: “{“code”:1017,“message”:“Invalid where clause”,“errorData”:{}}”,

Hi Alan,

Is it a POST or PUT request?

Btw, based on the docs, the body should contain an array: https://backendless.com/docs/rest/doc.html#data_relations_save_update

Regards,
Mark

Sorry, it’s a POST.

So i just tried to do [“94A40363-5Z7E-F774-FF87-B64760001A00”]

and i saw the same issue.

I feel it must be something really stupid, but while i am able to produce errors in postman, none of them are error 1017

Alan,
Please post a complete request (curl) which causes the issue. Also specify your backendless application id.

Anton

Not to worry, it was a stupid issue as suspected. The fetch URl that was built in my function had an object ID wrapped with quotation marks. Removed those and it now works a charm.