Exception: InstagramConnect::ApiError
- 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
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, error_code: nil, retry_after: nil) ⇒ ApiError
constructor
A new instance of ApiError.
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(, status: nil, error_code: nil, retry_after: nil) super() @status = status @error_code = error_code @retry_after = retry_after end |
Instance Attribute Details
#error_code ⇒ Object (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_after ⇒ Object (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 |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/instagram_connect/errors.rb', line 13 def status @status end |