When executing a workflow that contains a Microsoft SQL Server ‘Execute Query’ function, the only exit option for catching an error response is to stop the workflow. This does not allow for building API endpoints that can return any status error codes.
When executing the query, if you select the ‘on error’ function, ‘stop workflow’ will show the error. If you select ‘continue’ or ‘continue using error output’ the workflow simply continues to pass the previous nodes values and does not show any SQL error messages.
Hopefully I have provided enough information for some ideas or assistance. I can’t really share the flow as it contains all our SQL Server information.
Information on your n8n setup
n8n version 1.20.0 **
Running n8n via npm **
Operating system: Ubuntu Server **