error handling for channels