SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 73 forks source link

NodeJS Process Termination w/o exception when rfmParams contains empty string key in client.call #242

Closed tvormweg closed 2 years ago

tvormweg commented 2 years ago

Describe the bug Nothing urgent, but when you pass an object with an empty string key in it for the parameter rfmParams to client.call (see screenshot) it will terminate the NodeJS Process without throwing an exception.

To Reproduce Installed via npm locally. Test script:

const noderfc = require("node-rfc");
const pool = new noderfc.Pool({ connectionParameters: { 
    dest: "MME", // sap test system connection params
    USER:"BPINST",
    PASSWD:"Welcome1",
    ASHOST:"",
    SYSNR:"00",
    CLIENT:"100",
    LANG:"EN",
} });

(async () => {
    try {
        // get a client connection instance
        const client = await pool.acquire();
        const result = await client.call("RFC_PING", {
            "": ""
        })
        console.log(result);
    } catch (err) {
        // connection and invocation errors
        console.error(err);
    }
})();

Screenshots image

Environment image

Additional context Add any other context about the problem here.

bsrdjan commented 2 years ago

Thank you for reporting this bug. It will be fixed in next release.