Exception: PasskeysRails::Error

Inherits:
StandardError
  • Object
show all
Defined in:
app/models/passkeys_rails/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, hash = {}) ⇒ Error

Returns a new instance of Error.



5
6
7
8
# File 'app/models/passkeys_rails/error.rb', line 5

def initialize(message, hash = {})
  @hash = hash
  super(message)
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



3
4
5
# File 'app/models/passkeys_rails/error.rb', line 3

def hash
  @hash
end

Instance Method Details

#to_hObject



10
11
12
# File 'app/models/passkeys_rails/error.rb', line 10

def to_h
  { error: hash.merge(context: message) }
end