Problems with published REST-service in mendix 7.23.2

0
I have some problems while using published Rest-services in mendix 7.23.2 When implementing a published Rest-service a used the NativeRestpublish application from the app-store as example. But it seems that  First problem is a missing body in the Swagger when i don’t define a input parameter for the post operation. I have solved this problem by adding a parameter for the JSON-object. So now the object is available in the HttpRequest AND in the additional parameter. Is this the right way to solve this problem? Furthermore there is a problem with the Response.  I have created a POST-operation to create data. The HttpReponse i create is a copy of the responses of the example project. The error works fine but the succes (SF_CreateCreated201HttpResponseWithHeaders) results in: { "error": { "code": 500, "message": "An unexpected error occurred." } } The Post-operation is executed successfull however and the posted data are saved in the database. This is the response created in my source: Any suggestion how i can solve the problem so a succes-code 201 will be responded?
asked
2 answers
0

500 means a server error, so something went wrong in your app on the server side. You want to check your runtime logs to find out what it was.

answered
0

Thanks Reinout,
Problem solved. I created a Http-201 response but did not fill this response as a output-variable of the microflow so response was empty.
Missed it in the log-file.

answered