-
Notifications
You must be signed in to change notification settings - Fork 19
[FME-8356] - Events - Errors Metadata #720
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
Conversation
…0, but the JSON has the wrong structure
let event = SplitInternalEventWithMetadata(.sdkError, metadata: EventMetadata(type: .SEGMENTS_SYNC_ERROR, data: [])) | ||
notifyUpdate(event) |
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.
All of these could be extracted to a method
func notifyError(type: Type) {
let event = SplitInternalEventWithMetadata(.sdkError, metadata: EventMetadata(type: type, data: [])
notifyUpdate(event)
}
So it'll end up looking like
let event = SplitInternalEventWithMetadata(.sdkError, metadata: EventMetadata(type: .SEGMENTS_SYNC_ERROR, data: [])) | |
notifyUpdate(event) | |
notifyError(.SEGMENTS_SYNC_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'm not sure about this one because it's just two lines to abstract, and in the future we will probably have to build some metadata with actual useful data that will be different for each error.
Co-authored-by: gthea <[email protected]>
SonarQube Quality Gate |
iOS SDK
What did you accomplish?
Now the SDK reports errors with metadata for Flags and Segments sync problems.
How do we test the changes introduced in this PR?
Extra Notes