Skip to content

Conversation

@laevandus
Copy link
Contributor

@laevandus laevandus commented Oct 29, 2025

🔗 Issue Links

Fixes IOS-1206

🎯 Goal

Describe why we are making this change.

📝 Summary

Provide bullet points with the most important changes in the codebase.

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner October 29, 2025 12:35
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v5-stream-core-errors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

1 Message
📖 Skipping Danger since the Pull Request is classed as Draft/Work In Progress

Generated by 🚫 Danger

@laevandus laevandus marked this pull request as draft October 29, 2025 14:34
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 8.26 MB 7.69 MB -586 KB 🚀
StreamChatUI 4.89 MB 5.05 MB +161 KB 🟢

@github-actions
Copy link

Public Interface

- public struct ErrorPayload: LocalizedError, Codable, CustomDebugStringConvertible, Equatable  
- 
-   case code
-   case message
-   case statusCode = "StatusCode"
-   
- 
-   public let code: Int
-   public let message: String
-   public let statusCode: Int
-   public var errorDescription: String?
-   public var debugDescription: String

- public final class InvalidToken: ClientError, @unchecked Sendable

- public class ClientError: Error, CustomStringConvertible, @unchecked Sendable  
- 
-   public let location: Location?
-   public let message: String?
-   public let underlyingError: Error?
-   public var errorDescription: String?
-   public var errorPayload: ErrorPayload?
-   public var localizedDescription: String
-   public private lazy var description
-   
- 
-   public init(with error: Error? = nil,_ file: StaticString = #file,_ line: UInt = #line)
-   public init(_ message: String,_ file: StaticString = #file,_ line: UInt = #line)
-   
- 
-   public struct Location: Equatable  
-   
-     public let file: String
-     public let line: Int

- public final class EventDecoding: ClientError, @unchecked Sendable

- public final class WebSocket: ClientError, @unchecked Sendable

- public final class Unknown: ClientError, @unchecked Sendable

- public struct ErrorPayloadDetail: LocalizedError, Codable, Equatable  
- 
-   case code
-   case messages
-   
- 
-   public let code: Int
-   public let messages: [String]

- public final class Unexpected: ClientError, @unchecked Sendable

- extension ClientError: Equatable  
+ public extension ClientError  
-   public static func ==(lhs: ClientError,rhs: ClientError)-> Bool
+   override public var localizedDescription: String
+   override public var localizedDescription: String
+   override public var localizedDescription: String

@Stream-SDK-Bot
Copy link
Collaborator

StreamChat XCSize

Object Diff (bytes)
Logger.o -150466
MessageController.o -63079
ChannelController.o -56363
CDNClient.o -43048
RequestEncoder.o +27960
Show 221 more objects
Object Diff (bytes)
UserListController.o -24498
Chat.o -22103
ErrorPayload.o -20372
MessageEvents.o +18460
CurrentUserController.o -18423
RawJSON.o -11025
MessageReactionDTO.o -9629
NotificationEvents.o +9410
BaseLogDestination.o -8832
MemberController.o -8504
ChatMessage.o +8064
ChannelRepository.o -8035
UserController.o -7700
MessageSearchQuery.o -7108
ThreadEvents.o +6640
Timers.o -6207
StreamCollection.o -5968
ChannelEvents.o +5848
ReminderPayloads.o -5511
LazyCachedMapCollection.o -5419
OfflineRequestsRepository.o -5372
ClientError.o -5077
ChannelListController.o -4733
ChannelWatcherHandler.o -4693
ChannelListLinker.o -4525
LogDestination.o -4329
PollController.o -3926
ChannelList.o -3915
ChatClient+Environment.o +3658
MessageReminder.o +3572
AppSettings.o -3492
Thread.o +3420
ThreadListController.o -3394
ChatChannelWatcherListController.o -3297
MessageRepository.o -3028
UserSearchController.o -2918
MessageReminderListController.o -2803
Channel.o +2788
MessagePayloads.o +2661
AudioRecording.o -2526
LivestreamChannelController.o +2439
ChatState.o -2414
AudioPlaying.o +2341
Atomic.o -2305
MessageSearchController.o +2137
SyncOperations.o -2062
ThreadDTO.o -1945
EventDecoder.o -1931
ChannelEventsController.o -1892
Deprecations.o -1884
ChannelDTO.o -1813
PollVoteListController.o -1740
ReadStateHandler.o +1740
ReactionListController.o -1715
MulticastDelegate.o -1668
ConnectionRecoveryHandler.o -1647
APIClient.o -1631
SyncRepository.o -1500
DataController.o -1482
ChannelUpdater.o -1417
UserSearchState.o -1407
PollVoteListController+SwiftUI.o -1406
UserListQuery.o -1396
MessageReminderListQuery.o -1336
ConsoleLogDestination.o -1304
UnreadMessageLookup.o -1292
WebSocketClient.o -1266
UserUpdater.o -1258
ChannelListQuery.o -1210
StreamCore_-14BA7DE23376E301_PackageProduct +1180
PollDTO.o +1157
ChatState+Observer.o -1131
Token.o -1057
MemberListState+Observer.o -1017
ReactionListState+Observer.o -1006
BackgroundTaskScheduler.o -981
UserListState+Observer.o -958
SendMessageInterceptor.o +928
ReactionEvents.o +920
PrefixLogFormatter.o -917
ChatMessageImageAttachment.o -900
UserDTO.o -887
SystemEnvironment+XStreamClient.o +871
ConnectedUser.o -870
ChannelListState.o +861
MessageState+Observer.o -853
TypingEventsSender.o -852
ConnectedUserState.o -807
MessageEditor.o +792
MemberModelDTO.o -765
AnyAttachmentPayload.o +759
ChatClientConfig.o -751
ConnectedUserState+Observer.o +749
InternetConnection.o -746
ReactionListUpdater.o -696
ChannelListState+Observer.o +688
MessageController+SwiftUI.o -666
ChannelReadUpdaterMiddleware.o -652
AnyAttachmentUpdater.o -650
ChannelEditDetailPayload.o +648
MemberListController.o -640
AttachmentDTO.o -631
MessageUpdater.o -609
ConnectionRepository.o +594
ChannelController+SwiftUI.o -582
DraftMessage.o -572
ChannelListQueryDTO.o -557
PollVoteDTO.o -553
MessageSearchState.o -528
ConnectionController.o -500
PollVoteListQueryDTO.o -497
ReminderUpdaterMiddleware.o -492
ChannelMemberListQuery.o -492
Filter+predicate.o -488
MessageState.o -466
MessagePayload+asModel.o -458
MemberEventMiddleware.o -452
TypingStartCleanupMiddleware.o -452
StateBuilder.o -442
ChatClient.o -431
Filter.o +411
PollVoteListQuery.o -408
PushPreferenceLevel.o -404
MessageSearch.o -386
UserWatchingEventMiddleware.o -384
MessageSearchState+Observer.o -382
MessageSearchQueryDTO.o -372
ListChange.o -365
EventsController.o -362
ChannelListSortingKey.o -362
UnreadCount.o -354
RemindersRepository.o -352
AudioQueuePlayer.o +350
BackgroundDatabaseObserver.o -340
MessageAttachmentPayload.o -340
Controller.o +332
CurrentUserDTO.o -325
DatabaseSession.o -324
ChatMessageGiphyAttachment.o -320
ChatClient+Factory.o +316
ReactionListQueryDTO.o -313
MessageReminderDTO.o -300
ChannelMemberListSortingKey.o -300
EventDataProcessorMiddleware.o -300
EventType.o -292
CurrentUserUpdater.o -285
AITypingEvents.o -256
MessageSender.o -255
ChatRemoteNotificationHandler.o -247
MemberEvents.o -244
UserListUpdater.o -239
ChannelVisibilityEventMiddleware.o -228
EventNotificationCenter.o -227
UserChannelBanEventsMiddleware.o -226
UserController+SwiftUI.o -224
MessageTranslationsPayload.o -220
PollOptionDTO.o -213
UserUpdateMiddleware.o -212
URLSessionWebSocketEngine.o -212
DraftUpdaterMiddleware.o -212
ChannelTruncatedEventMiddleware.o -212
ChannelMemberListUpdater.o -211
ChannelMemberListQueryDTO.o -210
PushPreferenceDTO.o -208
UserListSortingKey.o -208
ChannelListUpdater.o -206
NSManagedObject+Extensions.o -206
AsyncOperation.o +206
UserPayloads.o -204
ReactionListState.o -193
MemberListController+SwiftUI.o -192
UserListController+SwiftUI.o -191
MessageDTO.o +191
ReactionListController+SwiftUI.o -191
ScheduledStreamTimer.o +182
ChannelListController+SwiftUI.o -178
ThreadParticipantDTO.o +176
ReminderEvents.o -172
OptionalDecodable.o -169
AttachmentQueueUploader.o -160
ActiveLiveLocationsEndTimeTracker.o -158
ChatClientFactory.o -144
MemberList.o +142
UserEvents.o -140
ConnectionEvents.o -134
AudioSessionConfiguring.o -133
ReactionList.o -128
ChatClient+ChannelController.o -125
MemberListState.o -121
GuestUserTokenPayload.o -112
EventBatcher.o +110
UserList.o -109
Sequence+CompactMapLoggingError.o -108
PollsRepository.o +105
LogFormatter.o -103
DatabaseContainer.o -102
AttachmentTypes.o -101
UserListQueryDTO.o -101
DraftMessagesRepository.o -98
ChatMessageVideoAttachment.o -98
DeviceDTO.o -96
ChannelMuteDTO.o -93
ChannelReadDTO.o -93
AudioAnalysing.o -90
ChannelId.o -85
RequestDecoder.o +85
BackgroundEntityDatabaseObserver.o +79
AudioAnalysisEngine.o -78
ChannelType.o -78
AuthenticationRepository.o -68
KeyedDecodingContainer+Array.o -68
MessageSearchController+SwiftUI.o +68
StringInterpolation+Extensions.o -64
AttachmentUploader.o -64
ThreadReadDTO.o +60
Foundation.tbd -60
DraftEvents.o -60
EventPayload.o -56
CountdownTracker.o +48
AttachmentDownloader.o +46
StreamRuntimeCheck.o -43

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatUI XCSize

Object Diff (bytes)
Task.o -17474
TaskFetchOriginalData.o +15391
AsyncTask.o +14463
ImageCache.o -12301
TaskLoadImage.o -11844
Show 292 more objects
Object Diff (bytes)
ImageDecoding.o -11502
TaskFetchOriginalImageData.o -9455
ChatChannelListItemView.o +8351
ImageTask.o +8277
ImageDecoders+Default.o +6986
Deprecations.o -6872
TaskFetchOriginalImage.o +6305
ImagePipeline+Cache.o +5951
TaskFetchDecodedImage.o -5912
Cache.o +5753
FetchImage.o -5172
ImageLoadingOptions.o +5159
ImagePipelineConfiguration.o -5123
ImageRequest.o +5123
AssetType.o +5065
ImagePipeline+Configuration.o +5037
InputChatMessageView.o +5016
ImagePipeline+Error.o +4837
DataLoader.o +4829
ChatThreadListItemView.o +4694
ImageProcessing.o -4663
ChatMessageDeliveryStatusView.o +4560
AttachmentsPreviewVC.o +4506
ImageViewExtensions.o -4446
ImageProcessors+Resize.o +4429
TaskLoadData.o +4282
ImageResponse.o -4234
ComposerVC.o +4018
QuotedChatMessageView.o +3955
ImagePipeline.o -3950
OperationTask.o -3614
ChatMessageHeaderDecoratorView.o +3550
ImagePipelineDelegate.o -3523
Graphics.o +3309
ImageContainer.o +3232
ChatMessageListVC.o +3229
ImageCaching.o +3205
TaskFetchWithPublisher.o +3062
ImagePipelineCache.o -3055
NSCacheWrapper.o +2929
MessageActionsTransitionController.o +2916
GalleryVC.o +2645
ImageDecoderRegistry.o +2445
AsyncPipelineTask.o +2431
ImagePipelineTask.o -2399
ImageLoading.o -2146
Combine.o -2095
String+Extensions.o -1956
ImageEncoding.o -1865
VideoPlaybackControlView.o +1860
NukeImageLoader.o +1856
ChatMessageReactionsPickerVC.o +1832
ChatMessageReactionAuthorsFlowLayout.o +1819
ChatChannelVC.o +1693
ChatChannelAvatarView.o +1633
Appearance+Images.o -1632
ImageEncoders+ImageIO.o +1627
PollResultsVC.o +1568
VideoAttachmentGalleryPreview.o +1531
StatefulScrollViewPaginationHandler.o +1511
DataPublisher.o +1491
InputTextView.o +1471
Deprecated.o -1409
ContainerStackView.o +1389
SwipeToReplyGestureHandler.o +1386
PollCreationVC.o +1372
StreamModalTransitioningDelegate.o +1364
ChatChannelListVC.o +1288
ImageRequestKeys.o +1264
PollAttachmentView.o +1254
VideoAttachmentGalleryCell.o +1230
ChatMessageVoiceRecordingAttachmentListView+ItemView.o +1174
ImageProcessingOptions.o +1152
ComposerView.o +1076
ZoomAnimator.o +1058
ViewContainerBuilder.o +1024
ChatThreadListVC.o +972
ChatSuggestionsVC.o +956
ChatMessageAttachmentPreviewVC.o +950
SwipeableView.o +945
ChatMessageReactionAuthorsVC.o +928
ImagePipeline+Delegate.o +925
ImagePublisher.o +907
UploadingOverlayView.o +884
ChatChannelHeaderView.o +883
PollAttachmentOptionListView.o +870
ChatReactionsBubbleView.o +847
ChatMessageInteractiveAttachmentView.o +828
ChatMessageListScrollOverlayView.o +828
Atomic.o +820
ChatMessageListView.o +813
VideoLoading.o -813
Extensions.o +796
UIImageView+SwiftyGif.o +787
ListCollectionViewLayout.o +783
ImageEncoders+Default.o +781
ChatChannelListErrorView.o +764
PollCommentListSectionFooterView.o +756
AlertsRouter.o +754
ChatMessageCell.o +745
GalleryCollectionViewCell.o +745
ChatChannelListCollectionViewCell.o +721
ChatChannelSearchVC.o +696
UIView+Extensions.o +693
PollCreationMultipleVotesFeatureCell.o +692
BaseViews.o +676
BannerView.o +670
ChatMessageImageGallery+ImagePreview.o +668
ChatMessageGalleryView.o +666
ChatMessageInteractiveAttachmentView+ActionButton.o +645
CheckboxControl.o +611
ChatMessageListRouter.o +610
BidirectionalPanGestureRecogniser.o +605
CurrentChatUserAvatarView.o +601
DifferenceKit+Stream.o +600
ChatMessageReactionItemView.o +599
ChatMessageActionControl.o +597
MediaButton.o +591
FileAttachmentView.o +586
ChatChannelListLoadingView.o +583
ResumableData.o +574
PollCreationSectionHeaderView.o +565
ChatMessageDeliveryStatusCheckmarkView.o +558
PollCreationOptionCell.o +550
StackedUserAvatarsView.o +546
ChatMessage+Extensions.o -536
ScrollViewPaginationHandler.o +535
ImageResize.o -532
PollCreationTextFieldView.o +529
ChatMessageFileAttachmentListView.o +529
ChatReactionPickerBubbleView.o +524
ChatAvatarView.o +510
ChatThreadListItemCell.o +506
CommandLabelView.o +500
ZoomDismissalInteractionController.o +494
ZoomTransitionController.o +488
ChatMessageVoiceRecordingAttachmentListView.o +487
ChatThreadArrowView.o +483
ChatChannelListLoadingViewCellContentView.o +477
GradientView.o +476
ChatLoadingIndicator.o +476
ClampedView.o +475
PollAttachmentOptionListItemView.o +472
VoiceRecordingAttachmentComposerPreview.o +471
SendButton.o +470
ChatChannelUnreadCountView+SwiftUI.o +470
CooldownView.o +468
ChatChannelListItemView+SwiftUI.o +467
CloseButton.o +467
ShareButton.o +467
ChatMessageContentView+SwiftUI.o +466
ChatChannelAvatarView+SwiftUI.o +465
QuotedChatMessageView+SwiftUI.o +465
AudioVisualizationView.o +458
MixedAttachmentViewInjector.o +455
ChatMessageDefaultReactionsBubbleView.o +453
ChatChannelListEmptyView.o +452
ComposerLinkPreviewView.o +451
ChatChannelListSearchVC.o +450
ChatMentionSuggestionView.o +449
ChatMessageLinkPreviewView.o +446
LockIndicatorView.o +445
CellActionView.o +442
ChatFileAttachmentListView+ItemView.o +439
ChatMessageActionsVC.o +432
NavigationVC.o +428
NSLayoutConstraint+Extensions.o +425
ChatMessageVoiceRecordingAttachmentListView+ItemViewPresenter.o +425
LiveRecordingView.o +409
ImagePrefetcher.o +405
ChatMessagePopupVC.o +402
ChatMessageGiphyView+GiphyBadge.o +399
ChatMessageListDateSeparatorView.o +396
Components.o -395
PlayPauseButton.o +395
PollResultsTableHeaderView.o +394
PollCreationFeatureSwitchView.o +393
PollCreationNameCell.o +392
JumpToUnreadMessagesButton.o +390
ChatPresenceAvatarView.o +386
ScrollToBottomButton.o +384
ChatSuggestionsCollectionViewLayout.o +379
OnlyLinkTappableTextView.o +376
ImageAttachmentGalleryCell.o +374
TextFieldView.o +373
ChatMentionSuggestionCollectionViewCell.o +371
AttachmentPreviewContainer.o +370
VoiceRecordingAttachmentQuotedPreview.o +369
ChatThreadUnreadCountView.o +365
PillButton.o +362
VideoAttachmentComposerPreview.o +362
ChatChannelListLoadingViewCell.o +358
PlayerView.o +358
RecordButton.o +356
UIImage+SwiftyGif.o +356
ChatSuggestionsCollectionView.o +353
Appearance+Formatters.o -352
OnlineIndicatorView.o +351
AttachmentActionButton.o +350
BadgeView.o +349
ChatMessageReactionsView.o +347
ChatMessageLayoutOptions.o -340
TypingAnimationView.o +339
ChatThreadHeaderView.o +336
ChatMessageGiphyView.o +332
PollAllOptionsListVC.o +324
DefaultAttachmentPreviewProvider.o +316
PollAllOptionsListItemCell.o +314
DefaultScrollViewKeyboardHandler.o +312
NavigationRouter.o +296
ImageResultsMapper.o -292
ComposerKeyboardHandler.o +291
PollCreationFeatureCell.o +291
ChatMessageReactionAuthorViewCell.o +289
ChatCommandSuggestionView.o +289
PollResultsSectionFooterView.o +288
PollCommentListVC.o +288
PollResultsVoteItemView.o +287
ChatThreadListEmptyView.o +287
RecordingIndicatorView.o +286
ChatChannelUnreadCountView.o +286
TypingIndicatorView.o +283
TitleContainerView.o +282
SlideToCancelView.o +281
WaveformView.o +276
ChatCommandSuggestionCollectionViewCell.o +275
ChatSuggestionsCollectionReusableView.o +273
ChatUnreadMessagesCountDecorationView.o +273
ChatThreadRepliesCountDecorationView.o +272
ImageDecompression.o +272
ChatReactionPickerReactionsView.o +267
ChatMessagesCountDecorationView.o +267
ChatThreadListHeaderBannerView.o +266
ChatMessageListUnreadCountView.o +266
ChatMessageErrorIndicator.o +261
ChatSuggestionsHeaderView.o +261
ChatThreadListLoadingView.o +261
ChatMessageDecorationView.o +261
ChatThreadListErrorView.o +259
PollCommentListItemView.o +259
ChatMessageBubbleView.o +257
CircularCloseButton.o +255
ShrinkInputButton.o +253
CellSeparatorView.o +253
ChatNavigationBar.o +253
AttachmentButton.o +252
RecordingTipView.o +252
CheckboxButton.o +250
CommandButton.o +249
ConfirmButton.o +249
StreamCDN.o +248
PollCommentListItemCell.o +247
PollResultsVoteItemCell.o +247
ChatThreadVC.o -243
GalleryAttachmentViewInjector.o +237
LinkedList.o +232
ChatUserAvatarView.o +222
Operation.o +194
UnsupportedAttachmentViewInjector.o -191
PollResultsSectionHeaderView.o +180
ImageAttachmentComposerPreview.o +178
PollResultsVoteListVC.o +172
ChatChannelListCollectionViewDelegate.o +169
ChatMessageContentView.o +163
LinkAttachmentViewInjector.o +162
StreamChat.tbd -160
FileAttachmentViewInjector.o +158
PollCommentListSectionHeaderView.o +156
UIStackView+Extensions.o +154
ChatMessageLayoutOptionsResolver.o -151
MarkdownFormatter.o -142
Log.o -140
DataCaching.o +136
StreamCore_-14BA7DE23376E301_PackageProduct +136
SwiftyGifManager.o -124
DataLoading.o +104
VoiceRecordingVC.o +102
Appearance.o +94
ChatMessageReactions+Types.o -92
ImageIO.tbd +92
ChatChannelListRouter.o -74
AnyDifferentiable.o +72
StagedChangeset.o +72
ImageProcessors.o +67
ImageEncoders.o +65
Calendar+StreamCalendar.o +64
L10n.o +60
PollAttachmentViewInjector.o +56
NukeImageProcessor.o -49
ChatMessageListVCDelegate.o -48
ElementPath.o -44
ImageLoaderOptions.o +42

@sonarqubecloud
Copy link

@laevandus laevandus marked this pull request as ready for review October 29, 2025 18:42
@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 5.01 ms 49.9% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 1.97 ms per s 50.75% 🔼 🟢
Frame rate 75 fps 77.95 fps 3.93% 🔼 🟢
Number of hitches 1 0.6 40.0% 🔼 🟢

import XCTest

final class ClientError_Tests: XCTestCase {
func test_isInvalidTokenError_whenUnderlayingErrorIsInvalidToken_returnsTrue() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you moved this test to core, right?

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.

5 participants