Exception: Assistant::BlogMediaToolBuilder::EmbedOpGuardError

Inherits:
StandardError
  • Object
show all
Defined in:
app/services/assistant/blog_media_tool_builder.rb

Overview

Raised by save_post_with_embed_op! when the proposed new_html fails
the same Assistant::BlogToolBuilder.guard_content checks that
update_blog_post / edit_blog_post run. Carries the JSON error payload
so each tool's execute can return it verbatim to the LLM rather
than persisting a hallucinated swap to post.solution.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ EmbedOpGuardError

Returns a new instance of EmbedOpGuardError.



15
16
17
18
# File 'app/services/assistant/blog_media_tool_builder.rb', line 15

def initialize(payload)
  @payload = payload
  super(payload)
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



13
14
15
# File 'app/services/assistant/blog_media_tool_builder.rb', line 13

def payload
  @payload
end