Skip to content

Add ability to handle errorsΒ #637

@f3dm76

Description

@f3dm76

What are you trying to achieve?

I'm displaying the chat like this:
ChatChannelView(viewFactory: viewFactory, channelController: controller)
Sometimes it just shows a loading indicator indefinitely, I guess there was some error inside ChatChannelController, I'd like to receive that error, display it for the user, and handle it somehow

If possible, how can you achieve this currently?

It's doable through ChatChannelVC.didFinishSynchronizing(error:), but I didn't find a way in SwiftUI

What would be the better way?

For example ChatChannelController can have an error publisher. Or ChatChannelView can have a closure parameter to handle errors.

GetStream Chat version: 4.62.0
GetStream Chat frameworks: StreamChat, StreamChatUI
iOS version: 18.0
Swift version: 6.0
Xcode version: 16.0
Device: sim iPhone 16 pro max

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions