It's all about the answers!

Ask a question

validator script Error : Returning [object object]

nannette Mori (50246) | asked Feb 12 '19, 12:36 p.m.

I have created several validator scripts and have defined the the return in a variable

var ReturnResult = status.OK_STATUS

I define the parameters in my if statement for the conditions I want it to throw an error

anything else has a result of status okay

which I define as return ReturnStatus outside of my if loop

If the condition is okay the console log displays return is [object object]

In the javascript log on the server the error is ['Return is []

Can anyone tell me why the return result is [object object]

One answer

permanent link
Olivier ROSET (5016) | answered Feb 22 '19, 5:14 a.m.

 Don't use console.log bug console.debug and look the object returned. 

Your answer

Register or to post your answer.