mobx.dart icon indicating copy to clipboard operation
mobx.dart copied to clipboard

await never ends when using with ObserverableFuture

Open subzero911 opened this issue 1 month ago • 2 comments

If I wrap my API call into ObservableFuture, it hides an error into its error field and does not let it propagate. So the code execution stucks on await as a future never resolves. It happens on fromJson/toJson type cast errors. Image I can't even see the error in the console, but only by means of debugger. In order to see logs I have to wrap the inner api call into .catchError

Image

Proposal:

ObservableFuture should rethrow error, so I could see it in the console, along with interrupting the awaiting.

subzero911 avatar Dec 10 '25 10:12 subzero911

Agree, this would be a good thing to have ...PR possible ?

pavanpodila avatar Dec 10 '25 13:12 pavanpodila

Unfortunately, I have not too much time to support your package, as I have a full-time job... and I'm not very familiar with the inner workings of your package. I was hoping that you would take the time to fix it yourself.

subzero911 avatar Dec 10 '25 13:12 subzero911