error handling with extended tests respectively