-
Notifications
You must be signed in to change notification settings - Fork 64
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
SWIFT-1129 Create full stack Swift example project #746
Conversation
do { | ||
try await body() | ||
} catch { | ||
print("Unexpected error: \(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@am-MongoDB I was wondering if you could suggest a good lightweight way to handle errors that occur when interacting with the back end. I didn't want to do anything too complicated, but printing also seems maybe too simple... thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll suggest some changes to the Views to show errors
@am-MongoDB I don't seem to be able to formally request you as a reviewer due to repo permissions, but let me know if GitHub will still let you leave comments or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I just have a few minor comments/questions
Examples/FullStackSwiftExample/Models/Sources/Models/Models.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Isabel Atkinson <isabel.atkinson@mongodb.com>
531976e
to
8718047
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
do { | ||
try await body() | ||
} catch { | ||
print("Unexpected error: \(error)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll suggest some changes to the Views to show errors
Examples/FullStackSwiftExample/iOSApp/Kittens/ViewModels/AddKittenViewModel.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/ViewModels/ViewUpdateDeleteKittenViewModel.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/ViewModels/ViewUpdateDeleteKittenViewModel.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/ViewModels/ViewUpdateDeleteKittenViewModel.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/Views/AddKitten.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/Views/KittenList.swift
Outdated
Show resolved
Hide resolved
Examples/FullStackSwiftExample/iOSApp/Kittens/Views/ViewUpdateDeleteKitten.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Morgan <andrew.morgan@mongodb.com>
Co-authored-by: Andrew Morgan <andrew.morgan@mongodb.com>
Co-authored-by: Andrew Morgan <andrew.morgan@mongodb.com>
SWIFT-1129