flanksource / mission-control

Other
10 stars 2 forks source link

Playbook - SQL - Error message is dropped if results are also returned #1183

Open junaid-ebrahim opened 1 month ago

junaid-ebrahim commented 1 month ago

When using the sql action with mssql ( but I suspect on all other sql types) , any raiserror message is missing in the result if the sql also returns a resultset, see example action below to reproduce, removing the select 'test result'; fixes the issue

    - name: raiserror1
      if: "always()"
      sql:
        connection: connection://default/mssql-db
        driver: mssql
        query: >
          select 'test result';raiserror('test error message 1',11,0)