-
Notifications
You must be signed in to change notification settings - Fork 61
Catch RPC exception on broadcastNetwork #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
eae2ce5 to
a186b03
Compare
a186b03 to
d7be9c1
Compare
|
Sorry, it is not really clear to me the desired behaviour: why do you handle internally the exception, breaking broadcastNetwork(), instead of propagate the exception to the caller (which just has try catch block and send a broadcastError)? |
|
I wanted it to just fail silently because the
If I let it throw and call Since the "localonion" command is not critical, I think that even if it fails to get the current Tor status, doesn't mean there was an error in the BTC process or anything worth telling the UI that the error happened. It will just try again in 1 second anyway. I'm thinking about a bigger refactor later, but I thought it would be more helpful to do smaller non intrusive fixes for now to at least get a baseline of how it should work. |
|
thanks, I reproduce the previously described case and that hack prevents to call the In other words, testing the PR when I switch power core ON: |
|
Thanks for looking into the PR btw, nice to feel like it's getting some progress. I agree, maybe failing silently inside is not the safest approach. I'll change that. What I don't really understand is why response code 500 (Internal Server Error) returns message "ok". The logic seems weird and I think it's only like that because it's too coupled with the logic on Since the I'll update the PR, let me know what you think :) |
d7be9c1 to
777483a
Compare
|
It looks better now, but I agree about refactoring all that exceptions. |
|
Hmm yeah I didn't check the peers list screen, I was only checking the ON/OFF toggle. |
777483a to
f6d28ce
Compare
f6d28ce to
5afd2c9
Compare
If the exception happens the service stops responding. Catch and send error instead.