Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt-score crashes when a manifest file is unparseable #70

Open
nick-kogan opened this issue Aug 8, 2024 · 1 comment
Open

dbt-score crashes when a manifest file is unparseable #70

nick-kogan opened this issue Aug 8, 2024 · 1 comment

Comments

@nick-kogan
Copy link

nick-kogan commented Aug 8, 2024

dbt-score doesn't properly handle manifest.json files that contain invalid JSON.

Steps to reproduce:

  1. Create a directory, e.g. example_dbt_project, and a target directory within that directory.
  2. Create a manifest.json file containing invalid JSON (e.g. an empty file) in the target directory.
  3. cd into example_dbt_project and run dbt-score lint.

Expected behavior:
dbt-score detects that the manifest file is invalid and handles it gracefully, e.g. by writing an error message about the manifest being invalid and exiting.

Actual behavior:
dbt-score raises an exception from within json.decoder library (e.g. json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)).

@matthieucan
Copy link
Contributor

Hi @nick-kogan, thanks for reporting this issue!
Given dbt-score merely forwards the exception raised somewhere else (e.g. in dbt's library), isn't it best to show it to users?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants