Error reporting in javascript

0 views
Skip to first unread message

sita...@gmail.com

unread,
Feb 27, 2013, 4:05:39 AM2/27/13
to sta...@clarkparsia.com
The javascript library seems to fail silently. Normally a node.js callback function has two parameters: function cb (err, result);

At the moment, if something goes wrong it just seems to return "undefined" as a result, with no hints as to what went wrong (no network, request unauthorized, server could not parse query, etc...)

Is there any way to get this information atm, or plans to make it available?

Edgar Rodriguez

unread,
Feb 27, 2013, 9:40:42 AM2/27/13
to sta...@clarkparsia.com
Hi!

Currently the server response is sent with the callbacks, so I think you should be getting 401, 404, 406 or other error code that is in a server response, as is done in some test cases (see this).

If there's other error while the request is being stablished (not related to a server response), it will only print it on the console, and return "undefined" as you point out.

We are planning on revising all error reporting & exception handling in the upcoming versions. 
I have created an issue in the github repository for this.

Thanks!

Edgar


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
 
 

Reply all
Reply to author
Forward
0 new messages