angular-sdk icon indicating copy to clipboard operation
angular-sdk copied to clipboard

400 response when trying to add a contact or group

Open giladaya opened this issue 10 years ago • 7 comments

  • New instance on enterprise.dreamfactory.com
  • Followed the configuration procedure from the readme file.
  • Registered as a new user via the app

Now, when I try to add a contact or a group, the POST request is sent but the response is a 400 with the message: No record(s) detected in request.

giladaya avatar Feb 17 '16 12:02 giladaya

Ok, did some investigations. The request sent by this webapp has this payload (for adding new group): {"name":"test"}

It seems like the backend expects the payload to be wrapped in another array. When (using cUrl) I issue a similar request but with the following payload, the request is successful and a new record is created: {"resource":{"name":"test"}}

giladaya avatar Feb 17 '16 12:02 giladaya

Any plan on fixing the package?

HarveyEV avatar Mar 26 '16 16:03 HarveyEV

Any records that you POST must be wrapped in a resource. This is how the DreamFactory API works and is documented on the wiki.

df-jablan avatar Mar 26 '16 23:03 df-jablan

I understand that, but the sample application package is broken. That was my point.

HarveyEV avatar Mar 26 '16 23:03 HarveyEV

Oh, I'm sorry, I didn't see you mention the sample application in your original message. Which sample application is exhibiting this behaviour?

df-jablan avatar Mar 26 '16 23:03 df-jablan

We're working on it. Package file will be rebuilt.

todda48 avatar Mar 28 '16 13:03 todda48

Fixed in release 1.0.4.

todda48 avatar Apr 21 '16 14:04 todda48