Loomio
Mon 3 Jun 2019 7:29AM

API - 422 Unprocessable Entity

KK Klaus Kobald Public Seen by 33

I am trying to connect the "dreams platform". I get a 422 error. To my understanding, some parameters do not fit. Or is there anything on the loomio server to be set up?
Please see this doc for a complete log:
https://docs.google.com/document/d/1-vJEihr9Q7VvUPhVaakp4JH1hOUkSGJZnGvqXbqHnJo/edit

it shows the request with the parameters.

RG

Robert Guthrie Mon 3 Jun 2019 9:01PM

Hi @klauskobald

Hrrmm.. so you're making these requests via an HTTP library?
Most likely problem is you're not authenticating properly, but if you're missing requred parameters it could throw that too.

I would recommend setting up a local loomio server in development mode and firing the same API requests at it

The place to start testing is within app/services/discussion_service.rb if you can put a byebug line in the create method you can see what it is that's throwing the problem.

Hope that helps.

KK

Klaus Kobald Mon 3 Jun 2019 9:21PM

found it: the group has to be public !!!