Exception: SolidObjects::ApplicationWriteForbidden

Inherits:
NonRetryableError show all
Defined in:
lib/solid_objects/errors.rb,
sig/generated/lib/solid_objects/errors.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actor_type:, actor_id:, message_name:) ⇒ ApplicationWriteForbidden

Returns a new instance of ApplicationWriteForbidden.

RBS:

  • (actor_type: String, actor_id: String, message_name: String) -> void

Parameters:

  • actor_type: (String)
  • actor_id: (String)
  • message_name: (String)


178
179
180
181
182
183
184
185
186
# File 'lib/solid_objects/errors.rb', line 178

def initialize(actor_type:, actor_id:, message_name:)
  @actor_type = actor_type
  @actor_id = actor_id
  @message_name = message_name
  super(
    "#{actor_type}(#{actor_id.inspect}).#{message_name} attempted an Active Record write; " \
      "mutate actor state, stage a commit action, or emit a durable effect instead"
  )
end

Instance Attribute Details

#actor_idObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


175
176
177
# File 'lib/solid_objects/errors.rb', line 175

def actor_id
  @actor_id
end

#actor_typeObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


175
176
177
# File 'lib/solid_objects/errors.rb', line 175

def actor_type
  @actor_type
end

#message_nameObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


175
176
177
# File 'lib/solid_objects/errors.rb', line 175

def message_name
  @message_name
end