-
Notifications
You must be signed in to change notification settings - Fork 382
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
Using Exceptions in Python (server) fails #167
Comments
zerorpc is effectively supposed to convert exception into a zerorpc error. Which should then be sent back to the client. Not sure what is going on here. Is it working with a Python client against a Python server? |
Thank you for your response. Invoking the same function from a Python Client results in the following:
Looks like this is the expected behavior? I assume the error is with node then? |
Effectively, you did get an exception RemoteError from the zerorpc client. Which encapsulates information about the remote error, ...obviously. So yes, it seems to be a problem between the nodejs client and the python server. I will try to find some time to debug this. Sorry for the trouble. |
Thank you. I added:
which now gives me the following result:
|
Right, it does seem to be a really awkward way to catch errors though. Will try to look into it. |
I have a node client and a python server, and when trying to raise an Exception in Python, I get the following error:
I have seen a previous issue, where a similar error is being addressed. However, the suggested solution seemed to be to use "assert". Asserts are strictly for development purposes, and using Exceptions are therefore preferred (read: needed).
Node (client):
Python (server):
Any suggestions as to how to deal with Exceptions in Python?
Edit: (I thought my example was similar to the one that you have on your website under "First Class Exceptions" at the bottom http://www.zerorpc.io/)
The text was updated successfully, but these errors were encountered: