Error
Represents an error state with optional cached data and error information.
This state indicates that an operation failed. The optional data parameter allows you to keep displaying cached data even when the network request fails, improving user experience in offline scenarios.
Parameters
T
The type of data.
data
Optional cached data to display despite the error.
error
The error that occurred during the operation.