Exception: TiktokBusinessApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- TiktokBusinessApi::Error
- Defined in:
- lib/tiktok_business_api/errors.rb
Overview
Base error class for the TikTok Business API
Direct Known Subclasses
ApiError, AuthenticationError, AuthorizationError, InvalidRequestError, RateLimitError
Instance Attribute Summary collapse
-
#body ⇒ Hash
readonly
Full response body.
-
#request ⇒ Hash
readonly
Request that caused the error.
-
#status_code ⇒ Integer
readonly
HTTP status code.
Instance Method Summary collapse
-
#initialize(message = nil, status_code = nil, body = nil, request = nil) ⇒ Error
constructor
Initialize a new error.
Constructor Details
#initialize(message = nil, status_code = nil, body = nil, request = nil) ⇒ Error
Initialize a new error
21 22 23 24 25 26 |
# File 'lib/tiktok_business_api/errors.rb', line 21 def initialize( = nil, status_code = nil, body = nil, request = nil) @status_code = status_code @body = body @request = request super() end |
Instance Attribute Details
#body ⇒ Hash (readonly)
Returns Full response body.
10 11 12 |
# File 'lib/tiktok_business_api/errors.rb', line 10 def body @body end |
#request ⇒ Hash (readonly)
Returns Request that caused the error.
13 14 15 |
# File 'lib/tiktok_business_api/errors.rb', line 13 def request @request end |
#status_code ⇒ Integer (readonly)
Returns HTTP status code.
7 8 9 |
# File 'lib/tiktok_business_api/errors.rb', line 7 def status_code @status_code end |