Simone
02/11/2022, 8:07 PMfunction users(event, rc, prc) {
local.qusers = usersService.load(rc.userid);
var st= = {};
var c = queryToArray(local.qusers);
st['statusCode'] = 200;
st['results'] = c;
return st;
}
i want to add validation and if validation is wrong return the status code along with error and if its true
, just return my st
Jonas Eriksson
02/15/2022, 11:16 AMif (cfhttp.StatusCode != 200)
{ writeOutput("Nope, because #cfhttp.StatusCode# ") }
else { writeOutput("Yay!") }
?