message: Only require env when sentry is setup
diff: @@ -20,12 +20,11 @@ cached_client = S3Client(
  )
  cached_client.set_as_default_client()
  +SENTRY_DSN = os.environ.get("SENTRY_DSN")
  +if SENTRY_DSN is not None:
  for expected_env in ["ENVIRONMENT"]:
  if expected_env not in os.environ:
  raise ValueError(f"Missing environment variable {expected_env}")
  -
  -SENTRY_DSN = os.environ.get("SENTRY_DSN")
  -if SENTRY_DSN is not None:
  sentry_sdk.init(
  SENTRY_DSN,
  # Set traces_sample_rate to 1.0 to capture 100%
  