The logic to get the build queue looks like:
def active_builds(self):
"""
Returns a list of incomplete builds
:rtype: list[Build]
"""
return [build for build in self.builds() if not build.is_finished]
The build.is_finished property includes the CANCELED state but not the ERROR state. This leads to the /queue API returning any build that ever ran that ended in ERROR state.
I'd like to get rid of build.is_finished entirely and have calling logic specify exact build states.