Please include the merge statement in the foreign key constraint error handler in MSSQL query.js
err.message.match(/The MERGE statement conflicted with the FOREIGN KEY constraint "(.)". The conflict occurred in database "(.)", table "(.)", column '(.)'./);
__Dialect: mssql