Skip to content

inconsistent behavior when calling ./ddctl with incorrect credentials #4

@weirdbricks

Description

@weirdbricks

Hello,

Thank you very much for your work on ddctl.
I'm a first time user of ddctl - while setting it up for the first time, I tried the following:

./ddctl downtime list all

and got:

Traceback (most recent call last):
  File "./ddctl", line 45, in <module>
    downtime.get_downtimes(ALL_DOWNTIMES=args['all'])
  File "/home/lamprosc/ddctl/brain/downtime.py", line 57, in get_downtimes
    .format(scope=downtime['scope'],
TypeError: string indices must be integers

Trying to get the tags also gave me an unexpected message:

./ddctl query tags --all
Unable to get all tags due to: 'tags'

Trying to mute a host gave me a clue on what was wrong :) :

./ddctl mute nukeitfromorbit
NOTE: Invalid API key or Application key.

After I fixed my credentials all errors went away. I'm not sure how much work would it be but would it be possible to make the error messages more consistent ? The NOTE: Invalid API key or Application key. makes perfect sense.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions