How to use the node-opcua-service-secure-channel.ServiceFault function in node-opcua-service-secure-channel

To help you get started, we’ve selected a few node-opcua-service-secure-channel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-server / source / base_server.ts View on Github external
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;
}
github node-opcua / node-opcua / packages / node-opcua-server / src / base_server.js View on Github external
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;
}