diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt index 75ad64c1c1..2b95949b27 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt @@ -88,7 +88,7 @@ class CardsRestClient @Inject constructor( UNAUTHORIZED -> TodaysStatsCardErrorType.UNAUTHORIZED else -> TodaysStatsCardErrorType.GENERIC_ERROR } - return TodaysStatsCardError(errorType) + return TodaysStatsCardError(errorType, error) } } @@ -110,7 +110,7 @@ class CardsRestClient @Inject constructor( UNAUTHORIZED -> PostCardErrorType.UNAUTHORIZED else -> PostCardErrorType.GENERIC_ERROR } - return PostCardError(errorType) + return PostCardError(errorType, error) } } diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/store/dashboard/CardsStore.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/store/dashboard/CardsStore.kt index 9d54658734..0cce72da6d 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/store/dashboard/CardsStore.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/store/dashboard/CardsStore.kt @@ -95,7 +95,8 @@ class CardsStore @Inject constructor( } class TodaysStatsCardError( - val type: TodaysStatsCardErrorType + val type: TodaysStatsCardErrorType, + val message: String? = null ) : OnChangedError enum class PostCardErrorType { @@ -104,7 +105,8 @@ class CardsStore @Inject constructor( } class PostCardError( - val type: PostCardErrorType + val type: PostCardErrorType, + val message: String? = null ) : OnChangedError enum class CardsErrorType {