Closed Charles-Gagnon closed 1 year ago
It seems ConnectionService.OpenSqlConnection
doesn't throw exception when it occurs, but simply logs it and returns null.
This certainly looks like a big miss in capturing connection failures and sounds like a good opportunity to address unknown failures.
We can fix this to throw exception, but is going to be a huge change to ensure callers catch exception and send response accordingly. And we also would need to see how these responses are handled by ADS, if we send error/send failed result.
Agreed, would probably suggest that we start by making an opt-in parameter for whether it throws or not and then going through the calls one-by-one as time permits and convert them to handle that if so.
It wasn't too bad once I started working on it, was able to handle exceptions just fine. Please review: https://github.com/microsoft/sqltoolsservice/pull/2190
Closing as resolved in the latest insiders build.
I saw this when opening the "Drop database" dialog, but I imagine it's a more general issue.
In the STS logs I see this.
Two things of note:
23-08-22 13:34:12.4076024 pid:45888 tid:12 sqltools Verbose: 0 : eventTID:9468 SqlError.ctor | ERR | Info Number 40613, Error State 1, Error Class 20, Error Message 'Database 'new_db' on server 'chgagnon.database.windows.net' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '{AEF25BF9-3295-413A-9D42-9178F6AB0E7F}'.', Procedure '', Line Number 0
It's not clear to me why this wasn't the error surfaced in the actual connection error. Maybe @cheenamalhotra can help investigate that.