diff --git a/dandi/validate.py b/dandi/validate.py
index a614bb7a..ff038262 100644
--- a/dandi/validate.py
+++ b/dandi/validate.py
@@ -51,7 +51,10 @@ def validate_dandi_nwb(filepath):
     """Provide validation of .nwb file regarding requirements we impose
     """
     # make sure that we have some basic metadata fields we require
-    meta = get_metadata(filepath)
+    try:
+        meta = get_metadata(filepath)
+    except BaseException as e:
+        return [f"Failed to read metadata: {e}"]
     return _check_required_fields(meta, _required_nwb_metadata_fields)
 
 

validate: crashes if file is not read ok
```shell
(git-annex)lena:~/proj/dandi/nwb-datasets[master]bendichter/Gao2018
$> dandi validate *nwb           
anm00314746_2015-10-20 09:36:04 (1).nwb: ok
anm00314746_2015-10-21 11:25:41 (1).nwb: ok
anm00314746_2015-10-22 15:17:38 (1).nwb: ok
anm00314756_2015-10-20 19:42:11 (1).nwb: ok
anm00314756_2015-10-23 14:10:29 (1).nwb: ok
anm00314757_2015-10-20 17:37:31 (1).nwb: ok
anm00314757_2015-10-21 18:02:48 (1).nwb: ok
anm00314758_2015-10-20 10:49:30.nwb: ok
anm00314758_2015-10-21 10:10:14 (1).nwb: ok
anm00314758_2015-10-22 11:20:47 (1).nwb: ok
anm00314758_2015-10-23 09:49:01 (1).nwb: ok
anm00314760_2015-10-20 15:52:30.nwb: ok
anm00314760_2015-10-21 16:44:27.nwb: ok
anm00314760_2015-10-22 16:39:13 (1).nwb: ok
BAYLORCD12_2018-01-25 19:16:01.nwb: ok
BAYLORCD12_2018-01-26 12:25:06.nwb: ok
Error: Could not construct DynamicTableRegion object due to The index 63 is out of range for this DynamicTable of length 63

$> dandi --version             
0.4.4+7.g2f45a27.dirty
```
diff --git a/dandi/tests/test_validate.py b/dandi/tests/test_validate.py
index c125bdf8..5b350283 100644
--- a/dandi/tests/test_validate.py
+++ b/dandi/tests/test_validate.py
@@ -12,3 +12,15 @@ def test_validate_simple2(simple2_nwb):
     # this file should be ok
     errors = validate_file(simple2_nwb)
     assert not errors
+
+
+def test_validate_bogus(tmp_path):
+    path = tmp_path / "wannabe.nwb"
+    path.write_text("not really nwb")
+    # intended to produce use-case for https://github.com/dandi/dandi-cli/issues/93
+    # but it would be tricky, so it is more of a smoke test that
+    # we do not crash
+    errors = validate_file(str(path))
+    # ATM we would get 2 errors -- since could not be open in two places,
+    # but that would be too rigid to test. Let's just see that we have expected errors
+    assert any(e.startswith("Failed to read metadata") for e in errors)

pip install -e .[test]
parse_log_pytest
pytest
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
appdirs==1.4.4
attrs==25.3.0
backports.tarfile==1.2.0
blessed==1.20.0
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
ci-info==0.3.0
click==8.1.8
click-didyoumean==0.3.1
coverage==7.8.0
cryptography==44.0.2
-e git+https://github.com/dandi/dandi-cli.git@2f45a2782cc0a6ba525c4c52d13f9bd6b3f91dc5#egg=dandi
diskcache==5.6.3
etelemetry==0.3.1
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
girder-client==3.2.8
h5py==3.13.0
hdmf==4.0.0
humanize==4.12.2
idna==3.10
importlib_metadata==8.6.1
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
keyring==25.6.0
keyrings.alt==5.0.2
mock==5.2.0
more-itertools==10.6.0
numpy==2.0.2
packaging @ file:///croot/packaging_1734472117206/work
pandas==2.2.3
pluggy @ file:///croot/pluggy_1733169602837/work
pycparser==2.22
pynwb==3.0.0
pyout==0.8.1
pytest @ file:///croot/pytest_1738938843180/work
pytest-cov==6.0.0
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
referencing==0.36.2
requests==2.32.3
requests-toolbelt==1.0.0
rpds-py==0.24.0
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
SecretStorage==3.3.3
semantic-version==2.10.0
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tqdm==4.67.1
typing_extensions==4.13.0
tzdata==2025.2
urllib3==2.3.0
wcwidth==0.2.13
zipp==3.21.0

name: dandi-cli
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - appdirs==1.4.4
      - attrs==25.3.0
      - backports-tarfile==1.2.0
      - blessed==1.20.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - ci-info==0.3.0
      - click==8.1.8
      - click-didyoumean==0.3.1
      - coverage==7.8.0
      - cryptography==44.0.2
      - dandi==0.0.0
      - diskcache==5.6.3
      - etelemetry==0.3.1
      - girder-client==3.2.8
      - h5py==3.13.0
      - hdmf==4.0.0
      - humanize==4.12.2
      - idna==3.10
      - importlib-metadata==8.6.1
      - jaraco-classes==3.4.0
      - jaraco-context==6.0.1
      - jaraco-functools==4.1.0
      - jeepney==0.9.0
      - joblib==1.4.2
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - keyring==25.6.0
      - keyrings-alt==5.0.2
      - mock==5.2.0
      - more-itertools==10.6.0
      - numpy==2.0.2
      - pandas==2.2.3
      - pycparser==2.22
      - pynwb==3.0.0
      - pyout==0.8.1
      - pytest-cov==6.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.2
      - referencing==0.36.2
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - rpds-py==0.24.0
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - secretstorage==3.3.3
      - semantic-version==2.10.0
      - six==1.17.0
      - tqdm==4.67.1
      - typing-extensions==4.13.0
      - tzdata==2025.2
      - urllib3==2.3.0
      - wcwidth==0.2.13
      - zipp==3.21.0
prefix: /opt/conda/envs/dandi-cli

dandi/tests/test_validate.py::test_validate_bogus
dandi/tests/test_validate.py::test_validate_simple1 dandi/tests/test_validate.py::test_validate_simple2
dandi/validate.py
dandi/validate.py