user28466051
user28466051

Reputation: 1

Is there any way lua script to capture the exception error in freeswitch.Dbh?

2025-01-21 20:45:59.832751 90.95% [ERR] switch_odbc.c:529 ERR: [update tbl_channel set msisdn = 100 where chan_name = 'CH001'] [STATE: 23000 CODE 2601 ERROR: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot insert duplicate key row in object 'dbo.tbl_channel' with unique index 'idx_msisdn'. The duplicate key value is (100). ]

I'm getting above error when trying to execute the update query in lua script but it throw exception error for unique column. Is there any way for lua script to capture the exception error?

local dbh = freeswitch.Dbh(DSN);
dbh:query("update tbl_channel set msisdn = 100 where chan_name = 'CH001'");
dbh:release();

Upvotes: 0

Views: 13

Answers (0)

Related Questions