Exception: Textus::EtagMismatch

Inherits:
Error
  • Object
show all
Defined in:
lib/textus/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#code, #details, #exit_code, #hint

Instance Method Summary collapse

Methods inherited from Error

#to_envelope

Constructor Details

#initialize(k, w, g) ⇒ EtagMismatch

Returns a new instance of EtagMismatch.



106
107
108
109
110
111
112
# File 'lib/textus/errors.rb', line 106

def initialize(k, w, g)
  super(
    "etag_mismatch", "etag mismatch on '#{k}'",
    details: { "key" => k, "wanted" => w, "got" => g },
    hint: "another writer changed this key; run 'textus get #{k}' to fetch the latest etag",
  )
end