When running the dbt-metabase exposures command it fails when it hits an item referencing a deactivated user. In particular, this line returns 404, causing the whole script to crash:
Possible solutions:
1) try-catch this block and fill-in the details with a generic anonymous user
2) use instead the /api/user?include_deactivated=true endpoint to list all users once and search by ID. This endpoint has the advantage of also retrieving deactivated user's details, whilst the /api/user/:id one returns 404.
When running the
dbt-metabase exposures
command it fails when it hits an item referencing a deactivated user. In particular, this line returns 404, causing the whole script to crash:https://github.com/gouline/dbt-metabase/blob/7d8c97ef46b2da7d4655280562c581d2659c9b79/dbtmetabase/metabase.py#L596
Possible solutions: 1) try-catch this block and fill-in the details with a generic anonymous user 2) use instead the
/api/user?include_deactivated=true
endpoint to list all users once and search by ID. This endpoint has the advantage of also retrieving deactivated user's details, whilst the/api/user/:id
one returns 404.