Refactored error reporting in service classes.