ApiException class
Thrown then something goes wrong with the request
- Inheritance
-
- Object
- HttpServiceException
- ApiException
Constructors
- ApiException({required bool networkError, int? httpCode, String? httpMessage, dynamic body, Exception? error})
- ApiException.fromDioError(DioError dioError)
-
factory
Properties
- body → dynamic
-
body is the body of the HTTP error response.
It may be
null
if the request can't reach to the http server, for example, occurring a dns error, network is not available.final - error → Exception?
-
The original unparsed exception
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpCode → int?
-
httpCode is the received HTTP status code
final
- httpMessage → String?
-
httpMessage is the received HTTP status message
final
- networkError → bool
-
networkError signals if there was an outage in connection
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited