You may want to raise a treeherder.webapp.api.ResourceNotFoundException instead.