code: def test_mask_invalid_geojson(runner, tmpdir, pixelated_image_file):
      """Invalid GeoJSON should fail"""
  
      output = str(tmpdir.join("test.tif"))
  
      # Using invalid JSON
      result = runner.invoke(
          main_group,
          ["mask", pixelated_image_file, output, "--geojson-mask", "-"],
          input="{bogus: value}",
      )
      assert result.exit_code == 2
      assert "GeoJSON could not be read" in result.output
  
      # Using invalid GeoJSON
      result = runner.invoke(
          main_group,
          ["mask", pixelated_image_file, output, "--geojson-mask", "-"],
          input='{"bogus": "value"}',
      )
      assert result.exit_code == 2
      assert "Invalid GeoJSON" in result.output
  
file_path: rasterio/tests/test_rio_mask.py
imports: import json
  import os
  import numpy
  import pytest
  import rasterio
  from rasterio.rio.main import main_group
label_desc: Use image node_id 7 for calling a global function with example usage: test_mask_invalid_geojson(runner, tmpdir, pixelated_image_file) without return types