Exception: InstagramConnect::ApiError

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

Overview

Raised when the Meta Graph API returns a non-success response. Carries the HTTP status, Meta's application-level error code, and any retry hint so callers (and the Result object) can react without re-parsing the body.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, error_code: nil, retry_after: nil) ⇒ ApiError

Returns a new instance of ApiError.



15
16
17
18
19
20
# File 'lib/instagram_connect/errors.rb', line 15

def initialize(message, status: nil, error_code: nil, retry_after: nil)
  super(message)
  @status = status
  @error_code = error_code
  @retry_after = retry_after
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



13
14
15
# File 'lib/instagram_connect/errors.rb', line 13

def error_code
  @error_code
end

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



13
14
15
# File 'lib/instagram_connect/errors.rb', line 13

def retry_after
  @retry_after
end

#statusObject (readonly)

Returns the value of attribute status.



13
14
15
# File 'lib/instagram_connect/errors.rb', line 13

def status
  @status
end