Google AI Error Handling

Is there someway to capture and respond to the HTTP error responses received from the Google AI integration? I’d like to be able to handle the 429 Quota exceeded and 429 Resource has been exhausted, as well as just simple non-responsive timeouts.

I can see these errors in the logs, but I cannot find a way to catch and handle them within my automations.

I’m still looking for a way to handle the error. I’ve added a continue_on_error to try and keep the script running if the Google AI call errors out. I’m assuming that if it does error, then the response will not be set and I’m trying to get this to work:

.
.
.
    response_variable: generated_content
    continue_on_error: true
    action: google_generative_ai_conversation.generate_content
  - if:
      - condition: template
        value_template: "{{ generated_content.text is none }}"
    then:
      - generated_content.text: "Google AI Error"
  - if:
      - condition: template
        value_template: "{{ 'no obvious motion detected' in generated_content.text | lower}}"
    then:
      - stop: ""
    else:
.
.
.

Unfortunately, I get a message malformed error when trying to save it. Does anyone see anything obvious that I’m doing wrong?

Bump, Bump.