I found a workaround.
Indeed, ScriptError and ScriptErrorDetails won't receive any information when a Connector encounters an error. But to my suprise, both ScriptErrorCount and ScriptErrorList will be updated with (partially) relevant information. ScriptErrorCount will be incremented and ScriptErrorList will receive a new text string "General Custom Database Error".
Well it's better than nothing. More so because both variables can be reset before custom error handling is going to take over. That way, there will be only one value to check, and one message to display.
Code like this can be used to handle Connector errors in a customised way:
SET ErrorMode = 0; // We take over from here
LET ScriptErrorCount = 0;
LET ScriptErrorList = '';
CUSTOM CONNECT TO ...;
SQL SELECT ...; // Perform some DB operation through this connection
IF ScriptErrorCount > 0 THEN
TRACE >>> An error occured while reading from DB. Reason = $(ScriptErrorList);
// Retry or do whatever is necessary
SET ErrorMode = 1;