troubleshooting Question

Javascript not executing in Azure

Avatar of Member_2_7966113
Member_2_7966113 asked on
46 Comments2 Solutions173 ViewsLast Modified:
Hello Experts,

I have coped and pasted the following javascript into my application, see image, but I keep on getting the error message shown in the image.
module.exports = function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');
    if (req.body && && && req.body.age && req.body.address){

    context.res = {
        //status: 200, /* Defaults to 200 */
        body: "Data is saved for user " + ( +" !!"

     context.bindings.outputDocument = JSON.stringify({
         age: req.body.age,
         address: req.body.address
else {
    context.res = {
        status: 400,
        body: "Please pass all user details"

Can someone let me know where I'm going wrong?


Join our community to see this answer!
Unlock 2 Answers and 46 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 46 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros