-
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Built Support for Offline User Actions (#2529)
* built_offline_user_actons_support * fixed failing tests * upgraded sdk version * upgraded dart sdk to 3.4.4 * downgraded build_runner to previous version * upgraded intl * resolved versions and upgraded sdk to 3.4.4 * updated workflows * refactored the no of lines in databasemutationfunctions * fixed dart format * fixed run check ignore * fixed dart format * covered some uncovered lines * fixed anlyze bug * minor commit * covered some uncovered lines * raised code coverage * covered most of the lines * code coverage raised * code coverage fixed for all files * fixed code coverage * fixed code coverage * built mocks * some minor changes
- Loading branch information
Showing
116 changed files
with
4,488 additions
and
1,992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/// Talawa Custom error strings. | ||
class TalawaErrors { | ||
/// GraphQL error for handling: User not found. | ||
static const String userNotFound = 'User not found'; | ||
|
||
/// GraphQL error for handling: User is not authenticated. | ||
static const String userNotAuthenticated = 'User is not authenticated'; | ||
|
||
/// GraphQL error for handling: Email address already exists. | ||
static const String emailAccountPresent = 'Email address already exists'; | ||
|
||
/// GraphQL error for handling: Invalid credentials. | ||
static const String wrongCredentials = 'Invalid credentials'; | ||
|
||
/// GraphQL error for handling: Organization not found. | ||
static const String organizationNotFound = 'Organization not found'; | ||
|
||
/// GraphQL error for handling: Access Token has expired. Please refresh session. | ||
static const String refreshAccessTokenExpiredException = | ||
'Access Token has expired. Please refresh session.'; | ||
|
||
/// GraphQL error for handling: Membership Request already exists. | ||
static const String memberRequestExist = 'Membership Request already exists'; | ||
|
||
/// GraphQL error for handling: Failed to determine project ID. | ||
static const String failedToDetermineProject = | ||
'Failed to determine project ID: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND'; | ||
|
||
/// Error for creating a post. | ||
static const String postCreationFailed = | ||
'You are offline. Failed to create post. Please try again.'; | ||
|
||
/// Error for updating a post. | ||
static const String postUpdateFailed = | ||
'You are offline. Failed to update post. Please try again.'; | ||
|
||
/// Error for deleting a post. | ||
static const String postDeletionFailed = | ||
'You are offline. Failed to delete post. Please try again.'; | ||
|
||
/// Error for creating an event. | ||
static const String eventCreationFailed = | ||
'You are offline. Failed to create event. Please try again.'; | ||
|
||
/// Error for updating an event. | ||
static const String eventUpdateFailed = | ||
'You are offline. Failed to update event. Please try again.'; | ||
|
||
/// Error for deleting an event. | ||
static const String eventDeletionFailed = | ||
'You are offline. Failed to delete event. Please try again.'; | ||
|
||
/// Error for sending a chat message. | ||
static const String chatMessageSendFailed = | ||
'You are offline. Failed to send chat message. Please try again.'; | ||
|
||
/// Error for deleting a chat message. | ||
static const String chatMessageDeletionFailed = | ||
'You are offline. Failed to delete chat message. Please try again.'; | ||
|
||
/// Error for updating user profile. | ||
static const String userProfileUpdateFailed = | ||
'You are offline. Failed to update user profile. Please try again.'; | ||
|
||
/// Error for deleting user profile. | ||
static const String userProfileDeletionFailed = | ||
'You are offline. Failed to delete user profile. Please try again.'; | ||
|
||
/// Error for saving user action. | ||
static const String userActionNotSaved = | ||
'You are offline. User action not saved.'; | ||
|
||
/// Error for login attempt when offline. | ||
static const String youAreOfflineUnableToLogin = | ||
'You are offline, unable to login, please try again later.'; | ||
|
||
/// Error for logout attempt when offline. | ||
static const String youAreOfflineUnableToLogout = | ||
'You are offline, unable to logout, please try again later.'; | ||
|
||
/// Error for signup attempt when offline. | ||
static const String youAreOfflineUnableToSignUp = | ||
'You are offline, unable to sign up, please try again later.'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import 'package:graphql_flutter/graphql_flutter.dart'; | ||
|
||
/// Exception thrown for critical actions that require special handling. | ||
/// | ||
/// Extends [OperationException] to integrate with GraphQL error handling. | ||
class CriticalActionException extends OperationException { | ||
/// Constructor for [CriticalActionException]. | ||
/// | ||
/// Takes a [actionError] message that describes the specific error encountered. | ||
CriticalActionException(this.actionError); | ||
|
||
/// The error message associated with this critical action. | ||
String actionError; | ||
|
||
@override | ||
String toString() => 'CriticalActionException: $actionError'; | ||
} |
Oops, something went wrong.