Open grumBit opened 3 weeks ago
Hi @stumelius, would you be the right person to take a look at this? Alternatively, if it would help I'm happy to create a PR with the checks I've seen on others. E.g.;
@grumBit Thanks for bringing this up! I agree with your approach. Would you mind opening a PR for this? I can review it
Error description
A
TypeError: 'NoneType' object is not subscriptable
error is returned when an incorrect API token is passed intodbt-cloud-cli
and these lines run;https://github.com/data-mie/dbt-cloud-cli/blob/cb2680d353727f895b958fd8c5a8fec7657962b6/dbt_cloud/cli.py#L120-L121
Because the response for a failed request does not include a data field, Python gives a
TypeError: 'NoneType' object is not subscriptable
error, which does not help identify the cause of the problem.Steps to reproduce the error
To reproduce the error, replace the
xxxxxx
s below with valid values and run the following;Result;
Possible fix
Replace the lines linked above with;
Which gives a more helpful error;