Exception: Supabase::Functions::Errors::FunctionsError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/supabase/functions/errors.rb

Overview

Base class — rescue this to catch any Functions-API failure.

Direct Known Subclasses

FunctionsHttpError, FunctionsRelayError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, name:, status:) ⇒ FunctionsError

Returns a new instance of FunctionsError.



10
11
12
13
14
# File 'lib/supabase/functions/errors.rb', line 10

def initialize(message, name:, status:)
  @name = name
  @status = status
  super(message.to_s)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/supabase/functions/errors.rb', line 8

def name
  @name
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/supabase/functions/errors.rb', line 8

def status
  @status
end

Instance Method Details

#to_hObject



16
17
18
# File 'lib/supabase/functions/errors.rb', line 16

def to_h
  { "name" => @name, "message" => message, "status" => @status }
end