DirectusError class
Error that any exception inside SDK will throw.
SDK should always throw DirectusError, and never Exception or DioError
.
If error is from an API (it returns status code > 400), that code will be set
as code. Otherwise code will be set to 1000. Error 1000 is used for when user didn't
properly configure SDK, or there is internal error.
- Implemented types
Constructors
-
DirectusError({required String message, int? code, Map<
String, Object?> ? additionalInfo}) - Constructor
- DirectusError.fromDio(Object error)
-
Convert
DioError
to DirectusError.
Properties
-
additionalInfo
↔ Map<
String, Object?> ? -
Additional info that can be provided to error.
latefinal
- code ↔ int
-
Error code.
latefinal
- dioError ↔ DioError?
-
Original DioError from error.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ String
-
Message explaining error.
latefinal
- 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited