experimental[patch]: return from HuggingGPT task executor task.run() exception (#20219)

**Description:** Fixes a bug in the HuggingGPT task execution logic
here:

      except Exception as e:
          self.status = "failed"
          self.message = str(e)
      self.status = "completed"
      self.save_product()

where a caught exception effectively just sets `self.message` and can
then throw an exception if, e.g., `self.product` is not defined.

**Issue:** None that I'm aware of.
**Dependencies:** None
**Twitter handle:** https://twitter.com/michaeljschock

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
pull/20269/head^2
Michael Schock 3 weeks ago committed by GitHub
parent 898362de81
commit 5e60d65917
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -69,6 +69,8 @@ class Task:
except Exception as e:
self.status = "failed"
self.message = str(e)
return self.message
self.status = "completed"
self.save_product()

Loading…
Cancel
Save