Kevin Bradshaw
Posts: 0
Joined: Sun Feb 01, 2015 2:05 pm

"Bad request" when saving an object to db

Hello!

Wonder if you can help with this one. I'm attempting to create a document in my "location" database which includes an object (a JSON formatted response from google API).

The geocoding and reverse all work fine, I'm just not able to save the reverse_geocode object to the db.

Attached are all the screens I thought would be relevant.

Image Image Image Image

Kevin Bradshaw
Posts: 0
Joined: Sun Feb 01, 2015 2:05 pm

"Bad request" when saving an object to db

This may be helpful:

"code: "DBSC252"
description: "Invalid value for type 'object': '{"results":[{"address_components":[{"lo"

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

"Bad request" when saving an object to db

Hi Kevin -

Please show how your storage variable is looks like when it's stored?

Kevin Bradshaw
Posts: 0
Joined: Sun Feb 01, 2015 2:05 pm

"Bad request" when saving an object to db

Fixed it! Just needed to add JSON.stringify before saving it to the db.

Return to “Issues”