Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datastore errorhandler] Incorporate a variable in error object to obtain the initial request. #4873

Open
2 of 14 tasks
amritnew opened this issue May 10, 2024 · 1 comment
Open
2 of 14 tasks
Labels
datastore Issues related to the DataStore Category feature-request A request for a new feature or an enhancement to an existing API or category.

Comments

@amritnew
Copy link

Description

When an error is triggered within the Datastore error handler, there isn't any mechanism to obtain the original request for the client to retry. It's necessary to establish a means to access the request for the client to retry any failed requests effectively.

final datastorePlugin = AmplifyDataStore(
        modelProvider: ModelProvider.instance,

        // Error handler for any error occurs during datastore save
        errorHandler: (error) {
          print('AWS Error: $error');
        },

        syncExpressions: syncExpression);

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

1.Create models as in schema
2. Initialize Datastore
3. Do Datastore.save()
4. Fails all incoming request in appsync or intercept iOS simulator request using any interceptor tool like Charles proxy OR Proxyman.
5. Analyze AmplifyException instance to retrieve original request.

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.19.0

Amplify Flutter Version

1.7.0

Deployment Method

Amplify CLI

Schema

type Todo @model {
    id: String!
    message: String!
    emails: [String!]!
    expirationUnixTime: AWSTimestamp
}
@khatruong2009 khatruong2009 added datastore Issues related to the DataStore Category pending-triage This issue is in the backlog of issues to triage labels May 10, 2024
@khatruong2009
Copy link
Contributor

Hi @amritnew, we will take a look at this issue and get back to you with any updates.

@NikaHsn NikaHsn added feature-request A request for a new feature or an enhancement to an existing API or category. and removed pending-triage This issue is in the backlog of issues to triage labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore Category feature-request A request for a new feature or an enhancement to an existing API or category.
Projects
None yet
Development

No branches or pull requests

3 participants