refactored error handling for the connector