cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Edge .NET SDK Propagating Service Errors

wtutak
1-Newbie

Edge .NET SDK Propagating Service Errors

We've implemented a .NET Edge client (derived from com.thingworx.communications.client.things.VirtualThing) using v5.6.1 of the SDK. How do we return meaningful error messages to clients when an exception occurs during a service invocation?

We've tried something like the following but the exception message does not get to the client.

  public override InfoTable handleServiceRequest(string serviceName, ValueCollection parameters)

  {

       throw new Exception("Some error occurred");

  }


Instead we observe the following error message in the Thingworx client when invoking the service:


Unable to Invoke Service MyService on XXX : null

1 REPLY 1
smanley
13-Aquamarine
(To:wtutak)

It seems that exceptions thrown in the client are only visible there. It looks like there isn't a way to get the exception to the platform

Top Tags