APIError class
Error that's being thrown by API in case of an expected error
Can be thrown in case of incorrect settings, runtime errors or API response codes which differ from 200 Instances of this class contain getters to check for some known error types
Constructors
- APIError(int data, {APIErrorType type = APIErrorType.local, String body = ''})
- API Error constructor
- APIError.tokenError()
-
Generates token error
factory
Properties
- body → String
-
Body of the server response
final
- data → int
-
Error code
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAccessError → bool
-
Checks for access error thrown by server (403 response code)
no setter
- isFloodError → bool
-
Checks for flood error thrown by server (429 response code)
no setter
- isIllegalRequestError → bool
-
Checks for Illegal Request error thrown by the library
no setter
- isUnknownHttpMethodError → bool
-
Checks for Unknown HTTP Method error thrown by the library
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → APIErrorType
-
See APIErrorType
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited