Hello Mario,
I am near to understand your point, however, I am not completely sure. Please, let me to explain. Certainly, the situation is like you describe, and, an error occur, however, it's not a fatal error, that is, once the user back to the main view, everything in that view continue working as expected, even the ability to go again to the another view.
So what's the point to check if "self" is defined or not? I mean, if the error occur, your code after the error is not executed, but, nothing else... I supose that you do something if the error did not occur, but, if the error occur, because the user go back to the main view, then you do nothing (because your code is not executed) and then nothing happens...
If you need from the main view that something is well executed in the another view, then you can use a flag variable, so, if the done event of the Http control is well executed, your flag variable is "true", for example, and, if the error occur, that flag variable can be "false" (you can set to "false" when enter the view), so, you can check that flag variable in the main view, so you know if the work is done or not.
Another possible idea is to use the app's ChangeView event, which allows to look what is the next view and the prev view: we can event prevent the user to change to a view from another, for example, until some code has been executed. So please, let me know if all of these can help you and just post here if you want to explain me a bit more about or what to place any questions.