Returning more useful type from error