Cloud Code Service does not recognize input param

I have a Cloud Code (a POST operations) with a single String input param. If I invoke the service the service responds that the param is “undefined”. But, it is not. What can I do?

Regards, Joerg

Hi @Jorg_Beyer

Your parameter is selected as required, so you need to pass the values there. If you invoke it via the console, you can do this in the parameters tab. Simply copy the schema of body to body and add your param values there.

Regards,
Marina

@Jorg_Beyer, If that is not your case, please provide more details. So we could help you

Hi,

I know and I do this already since a couple of weeks. This is not a new service.

My latest change: I have added a second parameter today, but removed it later as I do not need it. Since this change it does not work anymore. Any ideas?

Regards, Joerg

@Jorg_Beyer, Is this the error you are talking about “Cannot read property ‘trim’ of undefined” ?

Yes. I use the same set-up and trim logic in a couple of different APIs. All are working except the one I have mentioned. And, I have not changed the trim logic in this Service, but something else.

I have created a new Service (POST operation) for testing purposes:
image

This is the response I get:

I assume it has nothing to do with me but with the backendless deployment logic. Could you please investigate further. Thank you in advance.

I have just deleted the input parameter and created new ones for my Service. Now it works again. :+1:

But the problem with the newTestService still remains. Maybe it is still worth having a look at this.