Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function makeServiceFault(
statusCode: StatusCode,
messages: string[]
): ServiceFault {
const response = new ServiceFault();
response.responseHeader.serviceResult = statusCode;
// xx response.serviceDiagnostics.push( new DiagnosticInfo({ additionalInfo: messages.join("\n")}));
assert(_.isArray(messages));
assert(typeof messages[0] === "string");
response.responseHeader.stringTable = messages;
// tslint:disable:no-console
console.log(chalk.cyan(" messages "), messages.join("\n"));
return response;
}
function makeServiceFault(statusCode, messages) {
const response = new ServiceFault();
response.responseHeader.serviceResult = statusCode;
//xx response.serviceDiagnostics.push( new DiagnosticInfo({ additionalInfo: messages.join("\n")}));
assert(_.isArray(messages));
assert(typeof messages[0] === "string");
response.responseHeader.stringTable = messages;
console.log(" messages ".cyan, messages.join("\n"));
return response;
}