Skip to content

[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

Merged
merged 9 commits into from
Aug 13, 2025

Conversation

MartinCardozo-SDK
Copy link
Contributor

@MartinCardozo-SDK MartinCardozo-SDK commented Aug 13, 2025

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

@MartinCardozo-SDK MartinCardozo-SDK changed the base branch from master to FME-8393-Events-Baseline August 13, 2025 03:02
@MartinCardozo-SDK MartinCardozo-SDK self-assigned this Aug 13, 2025
@MartinCardozo-SDK MartinCardozo-SDK marked this pull request as ready for review August 13, 2025 12:42
@MartinCardozo-SDK MartinCardozo-SDK requested a review from a team as a code owner August 13, 2025 12:42
Comment on lines 58 to 59
let event = SplitInternalEventWithMetadata(.sdkError, metadata: EventMetadata(type: .SEGMENTS_SYNC_ERROR, data: []))
notifyUpdate(event)
Copy link
Contributor

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

Suggested change
let event = SplitInternalEventWithMetadata(.sdkError, metadata: EventMetadata(type: .SEGMENTS_SYNC_ERROR, data: []))
notifyUpdate(event)
notifyError(.SEGMENTS_SYNC_ERROR)

Copy link
Contributor Author

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.

Copy link

@MartinCardozo-SDK MartinCardozo-SDK merged commit 41904f5 into FME-8393-Events-Baseline Aug 13, 2025
6 checks passed
@MartinCardozo-SDK MartinCardozo-SDK deleted the FME-8356-Errors branch August 13, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants