2 Replies Latest reply on Mar 2, 2017 2:03 PM by ttom RSS
    ttom Newbie

    Exception thrown from the server code is not received in the C# client. But a generic exception is thrown

    Hi All,

     

    I created a service in the TWX server which does a particular action.

    The service code will throw some exception during some failure scenarios. Code which throw the exception is below:

    if()

    {

    do something

    }

    else {

        throw ("A device with ID already exists.");

    }

     

    Then i wrote a client application using TWX Edge .NET SDK v5.6.5.

    This application will connect to the server and calls the service. My expectation was that if service code throws above exception, i would get exception string in the client, so that i can take some decisions.

    In positive scenarios, everything is working fine.

     

    But during the failure scenarios (i.e. exception thrown from the service code in server), i am getting a entirely different exception in the client application.

    Exception details are below:

    "TwApiException was caught"

    "Error invoking Service for Entity. Internal Server Error. (Code 1110)"

     

     

    Any idea on why i am not getting the exception that is thrown from the server??/

     

    Thanks in advance.