Exception: Parse::Agent::NotImplemented

Inherits:
AgentError
  • Object
show all
Defined in:
lib/parse/agent/errors.rb

Overview

Raised by Parse::Agent::Tools.invoke when a tool name is recognized (advertised in a permission tier / passes the gates) but has no handler in this SDK version. The built-in raw-CRUD write/admin tools (create_object, update_object, delete_object, create_class, delete_class) are declared in the write/admin tiers but ship without an implementation — invoking one previously raised a bare NoMethodError that collapsed to an opaque "internal error" on the wire. This turns that into a clear, typed refusal so the caller learns the tool is not implemented rather than that the SDK broke.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_name, message = nil) ⇒ NotImplemented

Returns a new instance of NotImplemented.



161
162
163
164
165
166
167
168
# File 'lib/parse/agent/errors.rb', line 161

def initialize(tool_name, message = nil)
  @tool_name = tool_name.to_s
  super(message || "Tool '#{@tool_name}' is recognized but not implemented in this " \
                   "SDK version. The built-in raw create/update/delete tools are not " \
                   "available; expose the operation as an application method via " \
                   "`agent_method` + `call_method`, or register a handler with " \
                   "`Parse::Agent::Tools.register`.")
end

Instance Attribute Details

#tool_nameObject (readonly)

Returns the value of attribute tool_name.



159
160
161
# File 'lib/parse/agent/errors.rb', line 159

def tool_name
  @tool_name
end