Catch error event for TDS