RedHatInsights/bonfire

Empty dictionary needs to be checked in Namespace.refresh()

bsquizz opened this issue · 0 comments

If you pass in an invalid namespace name to a Namespace and call .refresh() on it, get_json will return {} and the lines of code checking for annotations/labels will hit a KeyError

https://github.com/RedHatInsights/bonfire/blob/master/bonfire/namespaces.py#L124-L131

We should fail with a more user-friendly error if the namespace does not exist.