i have created a API and it seems to work when i Fetch schema but when i use the form i’m getting a error 400…
This just started happening and i’m not sure if it’s related to the release of the new app connect …
I have the debuger on and it’s responding with this message
{
“detail”: “Input data validation error: {‘loc’: (‘ root ’,), ‘msg’: ‘value is not a valid dict’, ‘type’: ‘type_error.dict’}”
}
here are a couple of screenshots that explain the flow better…mind you that all this was working before the something the server connect code changes…i tried to go back and it didn’t work either…
Pass Errors checkbox is checked, the error you’re seeing could be the remote API returning that error.
Use a service like Beeceptor and change the API Action to hit that mock API so you can see what data your Wappler app is sending. Most likely, the remote API service is not receiving data correctly from Wappler.
in the second image as you can se when i fetch the api data from server connect the data is displayed which to my understand means the api is sending and receiving but on the page it’s just not showing…
That screenshot proves an example request is working.
However, I can see there’s an input field “description” on your form. So, you’re no longer making an example request, but actually injecting the description into the API Action, right?
Yes…this api is a copy of the original and the only diffrence is the description input field and I generated that form as I have before using the wappler generator…here is the original.
Let’s try something, instead of putting JSON directly there in JSON data, put a Group step and inside it put a Set Value description = {{ $_POST.descriptions }}.
In API Action JSON data, put {{groupName}}, where groupName is the name you gave to the Group
Regarding point 3, not sure if it works like that, or if we have to apply a JSON encode formatter, I don’t remember what’s it called, and I’m not sure if Wappler shows it in the UI
Edit: Found the JSON encode formatter:
So the expression probably is {{groupName.toJSON()}}