You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran into an issue while trying to make a network request on an NextcloudAPI instance, on which I called close() before.
Of course, it failed, but at an odd place, that I didn't expected (I think context was null at some place).
This made me wondering why we do check for NetworkRequest#mDestroyed when connecting, but not before each request. Wouldn't make it sense to add this check also at the beginning of AidlNetworkRequest#performNetworkRequestV2 and throw a more meaningful IllegalStateException or something alike?
Yes, that makes perfect sense to me. Would for sure improve error handling a lot (and make it easier for devs to find the error in case something goes wrong).
I recently ran into an issue while trying to make a network request on an
NextcloudAPI
instance, on which I calledclose()
before.Of course, it failed, but at an odd place, that I didn't expected (I think
context
wasnull
at some place).This made me wondering why we do check for
NetworkRequest#mDestroyed
whenconnect
ing, but not before each request. Wouldn't make it sense to add this check also at the beginning ofAidlNetworkRequest#performNetworkRequestV2
and throw a more meaningfulIllegalStateException
or something alike?cc @David-Development
The text was updated successfully, but these errors were encountered: