Comments (8)
@joaoantoniomartinsfilho You are not missing anything. That looks like unexpected behavior. We will see if we can reproduce it.
from amplify-flutter.
Hello @joaoantoniomartinsfilho - This does appear to be a bug. The exception is not getting mapped correctly. e
should be type UserLambdaValidationException
, not LambdaException
.
The reason that you are not able to type check the underlying exception is that there are actually two UserLambdaValidationException
types. One is public and extends AmplifyException
. The other is private and is only intended to be used internally. The underlying exception is the private/internal one. However, if e
was the correct type you would not need to check the type of e.underlyingException
Thanks for raising the issue. I will look into a fix and let you know when we have an update.
from amplify-flutter.
@jmartins-sh - This issue was addressed in Amplify Flutter v2 which was released a couple weeks ago. There were some breaking changes in this version. Please see the upgrade guide for more info.
from amplify-flutter.
Hello @joaoantoniomartinsfilho
_$UserLambdaValidationException extends UserLambdaValidationException. Here is the class definition. It is an internal class used for json serialization with built_value.
If you want to check if the exception is a UserLambdaValidationException you can do the following.
if (e is UserLambdaValidationException) {
// handle exception
}
Let me know if you have any other questions.
from amplify-flutter.
Hey @Jordan-Nelson, how's it going?
Thanks for the reply.
Do you mean checking directly the underlying exception, instead of the runtime type?
from amplify-flutter.
Hey @Jordan-Nelson , I followed your suggestion, but even after that, the comparison using the is
operator with underlyingException
is returning false
, as you can check in the screenshot below.
Did I misunderstand something, or is there something else I need to consider?
from amplify-flutter.
Hey @Jordan-Nelson, thanks for the reply.
I just have one more question, is the lib amplify-flutter independent of Amplify Gen 2 right? Or Am I getting this wrong? My project is currently running in Amplify Gen 1 (amplify-cli and cloud). Will we face any issues using the lib 2.0?
Appreciate it.
from amplify-flutter.
Hi @jmartins-sh - Amplify Flutter v2 is compatible with Amplify Gen 1 and Amplify Gen 2.
from amplify-flutter.
Related Issues (20)
- Datastore query returns empty list even when isSynced: true in observeQuery snapshot. HOT 2
- [aws_common] update the "js" version in pubspec HOT 2
- a.customType({}) modelgen issue - Single-Table-Design flutter Amplify-gen2 HOT 2
- feature request: Emit info from signInWithWebUI through Auth Hub HOT 8
- Amplify.configure() incorrectly throws JSON parsing validation error on valid JSON string. Improve error login on Amplify.configure() HOT 4
- fix: expired link at document HOT 1
- Unable to instantiate activity ComponentInfo HOT 2
- Document how to set a model field to null HOT 3
- Document how to get encoded access token HOT 5
- Inspect your amplifyconfiguration.dart and ensure that the string is proper json HOT 5
- Input resolver for TextField errorText and Hint
- Cloud Messaging API (Legacy) will be removed HOT 3
- Face Liveness support HOT 1
- Error occurred awaiting for device token to register device with Pinpoint, Invalid identity pool configuration. Check assigned IAM roles for this pool. HOT 5
- iOS sync stop when app is in background and screen off only in Release HOT 6
- How to pass SignInOptions to Authenticator v2? HOT 14
- [Gen 2] Feature request: Support secondary index query with sorting HOT 3
- Capability to retry the api request as well as handle the cancellation HOT 8
- [Gen2] dynamodb error when having optional sortkeys HOT 3
- How to Use auth resources without an Amplify backend? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-flutter.