mkschreder / orangerpcd

Websocket RPC server for OpenWRT
Other
27 stars 11 forks source link

Adds error message to returning JSON #15

Open nicopace opened 7 years ago

nicopace commented 7 years ago

When something fails in a custom plugin (a lua code that gets called by the websocket server), the orangerpcd was not returning no detail about the error.

This pull request adds the error message to the json response.

Would be great to add a switch to setup a 'development mode' where these messages are sent or logged... this is not included in the pull request.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.08%) to 83.325% when pulling 9bdf1bc58da0a4996ff98deb34c11981d6605ee3 on nicopace:master into da616c23648f032fd88dc84ac7a2c7450febcb91 on mkschreder:master.

nicopace commented 7 years ago

Had you had the chance to fix this? we are working on an API that uses your orangerpcd service in LibreMesh and we really need this implemented to be able to debug our own issues :) cc @nicoechaniz

mkschreder commented 7 years ago

Check if this commit does what you are after: https://github.com/mkschreder/orangerpcd/commit/0ba596e8d14362eea89442c0e0ccbc94ecd44e8f

Were you just interested in getting more information about the error to the frontend? During development it is also a good idea to run the server manually in verbose mode using -vvvv cli option. Try this: "orangerpcd -p /usr/lib/orange/api/ -vvvv".

On Thu, Apr 6, 2017 at 10:01 PM, Nicolás Pace notifications@github.com wrote:

Had you had the chance to fix this? we are working on an API that uses your orangerpcd service in LibreMesh and we really need this implemented to be able to debug our own issues :) cc @nicoechaniz https://github.com/nicoechaniz

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mkschreder/orangerpcd/pull/15#issuecomment-292298702, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiUKiD-qcOM3sYUBzHcCaDJk3RHGQks5rtUSZgaJpZM4MgHa0 .