System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

376 views
Skip to first unread message

mw35tin_

unread,
Jan 12, 2018, 9:24:47 AM1/12/18
to Clio Developers
Hello.  I'm working with a .NET desktop application to create contacts, matters, and notes in clio.  Occasionally depending on the note.detail element value that I'm posting, I'll get an 'Error 500: Internal server error'.  My exception message and stack trace don't give me any more info on exactly what is causing the error.  I've verified the json payload is valid.  Note I said occasionally.  If I were to put a simple one sentence value in the note.detail element then I won't get an error.  I've used the same json payload in a rest api client like postman and it goes through just fine.  How can I figure out exactly what is causing the 500 response?  I've tried sniffing the traffic with wireshark but because it's ssl all the traffic is encrypted and I can't read the response.  Any help is appreciated.  Thank you kindly.

Tony Valenti

unread,
Jan 12, 2018, 9:28:45 AM1/12/18
to mw35tin_, Clio Developers
Hi MW!
Are you using ClioKit or your own library for talking to Clio?  In all honesty, the Clio API should never return a 500 internal server error.  If it is, there is something wrong.



Always glad to help,

AlphaDrive for Clio
 
Tony Valenti
Software Engineer
T: 402-401-7568
E: Tony.V...@AlphaDriveForClio.com
W: www.AlphaDriveForClio.com
 
Schedule a Meeting with Me
This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this e-mail. Please notify us immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore we do not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

On Fri, Jan 12, 2018 at 8:24 AM, mw35tin_ <phoe...@gmail.com> wrote:
Hello.  I'm working with a .NET desktop application to create contacts, matters, and notes in clio.  Occasionally depending on the note.detail element value that I'm posting, I'll get an 'Error 500: Internal server error'.  My exception message and stack trace don't give me any more info on exactly what is causing the error.  I've verified the json payload is valid.  Note I said occasionally.  If I were to put a simple one sentence value in the note.detail element then I won't get an error.  I've used the same json payload in a rest api client like postman and it goes through just fine.  How can I figure out exactly what is causing the 500 response?  I've tried sniffing the traffic with wireshark but because it's ssl all the traffic is encrypted and I can't read the response.  Any help is appreciated.  Thank you kindly.

--
You received this message because you are subscribed to the Google Groups "Clio Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clio-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Valenti

unread,
Jan 12, 2018, 9:30:27 AM1/12/18
to mw35tin_, Clio Developers
Also, are you submitting the data using the FORMS method or the JSON method?  Can you post a sample payload?



Always glad to help,

AlphaDrive for Clio
 
Tony Valenti
Software Engineer
T: 402-401-7568
E: Tony.V...@AlphaDriveForClio.com
W: www.AlphaDriveForClio.com
 
Schedule a Meeting with Me
This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this e-mail. Please notify us immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore we do not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

On Fri, Jan 12, 2018 at 8:28 AM, Tony Valenti <tony.v...@alphadriveforclio.com> wrote:
Hi MW!
Are you using ClioKit or your own library for talking to Clio?  In all honesty, the Clio API should never return a 500 internal server error.  If it is, there is something wrong.



Always glad to help,

AlphaDrive for Clio
 
Tony Valenti
Software Engineer
T: 402-401-7568
This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this e-mail. Please notify us immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore we do not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

mw35tin_

unread,
Jan 12, 2018, 9:35:48 AM1/12/18
to Clio Developers
Thank you for the quick reply Tony.  I'm using my own libraries.

mw35tin_

unread,
Jan 12, 2018, 9:42:47 AM1/12/18
to Clio Developers
I'm using json method.  After the contact is created I create a related matter.  After the matter is created I create a note for that matter.

Here is sample payload that throws 500 error which according to jsonlint is valid json:

{
  "note": {
    "subject": "Sample intake created on: 2018-01-12",
    "detail": "SampleDialogBox: 1/12/2018 12:00 AM\r\n\r\nSampleDialogBox: tes\r\n\r\nLead Details: N/A\r\n\r\nDescription of Accident: \r\ntes \r\n\r\nSampleDialogBox: \r\n1/12/2018 \r\n\r\nSampleDialogBox: \r\nUnder 9 months \r\n\r\nSampleDialogBox? \r\nNo \r\n\r\nSampleDialogBox? \r\nNo \r\n\r\nSampleDialogBox? \r\nAmputation \r\n\r\nPolice arrive at scene? \r\nNo \r\n\r\nPolice indicate fault? \r\nClient \r\n\r\nDid you go to ER? \r\nNo \r\n\r\nGo by Ambulance? \r\nNo \r\n\r\nAccident over 3 weeks plus no medical? \r\nNo \r\n\r\nSampleDialogBox? \r\nNo \r\n\r\nWas vehicle damaged? \r\nyes > 1000 \r\n\r\nDriver? Passenger? Pedestrian? \r\nDriver \r\n\r\nPassengers injured? \r\nNo \r\n\r\nPassengers Information: \r\ntest \r\n\r\nDefendant(s) Name(s): \r\ntest \r\n\r\nDefendant(s) Insurance: \r\ntest \r\n\r\nIs there UM/UIM available? \r\nNo \r\n\r\nIf UM/UIM, insurance company & amount? \r\ntest \r\n\r\nIs there PIP? \r\nNo \r\n\r\nIf PIP, insurance company? \r\ntest \r\n\r\nMedical coverage? \r\nNo \r\n\r\nState where occurred? \r\nTexas \r\n\r\nSampleDialogBox? \r\nNo \r\n\r\nInjury type: \r\nHard injury \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\nCurrent/Previous Attorney Name: N/A\r\nLitigation Filed: \r\nReason for Seeking New Representation: \r\n\r\nInjured Name: Same as Client\r\nRelation to Client: \r\nDate of Birth: \r\nMinor: No\r\nDeceased: No\r\nDate of Death: \r\nCause of Death: \r\n\r\nCaller Name: Same as Client\r\nRelation to Client: \r\nSampleDialogBox: ",
    "regarding": {
      "type": "Matter",
      "id": 31337
    },
    "date": "2018-01-12"
  }
}

And here is sample sample that posts successfully:

{
  "note": {
    "subject": "Sample intake created on: 2018-01-12",
    "detail": "I am a very simple sentence",
    "regarding": {
      "type": "Matter",
      "id": 31337
    },
    "date": "2018-01-12"
  }
}

On Friday, January 12, 2018 at 9:30:27 AM UTC-5, Tony Valenti wrote:
Also, are you submitting the data using the FORMS method or the JSON method?  Can you post a sample payload?



Always glad to help,

AlphaDrive for Clio
 
Tony Valenti
Software Engineer
T: 402-401-7568
E: Tony.V...@AlphaDriveForClio.com
W: www.AlphaDriveForClio.com
 
Schedule a Meeting with Me
This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this e-mail. Please notify us immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore we do not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

On Fri, Jan 12, 2018 at 8:28 AM, Tony Valenti <tony.v...@alphadriveforclio.com> wrote:
Hi MW!
Are you using ClioKit or your own library for talking to Clio?  In all honesty, the Clio API should never return a 500 internal server error.  If it is, there is something wrong.



Always glad to help,

AlphaDrive for Clio
 
Tony Valenti
Software Engineer
T: 402-401-7568
E: Tony.V...@AlphaDriveForClio.com
W: www.AlphaDriveForClio.com
 
Schedule a Meeting with Me
This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this e-mail. Please notify us immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore we do not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
On Fri, Jan 12, 2018 at 8:24 AM, mw35tin_ <phoe...@gmail.com> wrote:
Hello.  I'm working with a .NET desktop application to create contacts, matters, and notes in clio.  Occasionally depending on the note.detail element value that I'm posting, I'll get an 'Error 500: Internal server error'.  My exception message and stack trace don't give me any more info on exactly what is causing the error.  I've verified the json payload is valid.  Note I said occasionally.  If I were to put a simple one sentence value in the note.detail element then I won't get an error.  I've used the same json payload in a rest api client like postman and it goes through just fine.  How can I figure out exactly what is causing the 500 response?  I've tried sniffing the traffic with wireshark but because it's ssl all the traffic is encrypted and I can't read the response.  Any help is appreciated.  Thank you kindly.

--
You received this message because you are subscribed to the Google Groups "Clio Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clio-develope...@googlegroups.com.

matthe...@clio.com

unread,
Jan 22, 2018, 7:19:53 PM1/22/18
to Clio Developers
Hi.

The behaviour that you are seeing is unusual.  It is strange that you are getting a valid response when posting the complicated JSON with Postman, but receiving a 500 error from submitting using other methods.

For inconsistent behaviour like this, the first step is to dig in at the code level.  The best place is to post as a question on www.stackoverflow.com (free to join) with the tag clio-api

For detailed how-to questions like this, www.stackoverflow.com is the best place to post so that any clarifications that we provide can be accessed by the community of Clio API developers.

Stack Overflow is a question and answer site for professional and enthusiast programmers. 50M users visit each month to ask and answer technical questions about specific implementations and technologies.

You can search for questions with the [clio-api] tag to find questions that have already been submitted to the Stack Overflow community.  
Submit technical Clio API questions as a Clio Integration Developer to www.stackoverflow.com with tag [clio-api] and other relevant tags (example: [php], [oAuth] ,etc) . 

If you have code level issues, Stack Overflow is the best place to leverage the skills of the largest community of experts to troubleshoot 

Let's take this first step & we can then look at other options to solve this issue.

Matt
Reply all
Reply to author
Forward
0 new messages