Status code 500, when trying to view ticket by ticket id

When I try to view ticket using "helpdesk/tickets/[id].json" (sample below) I get a response from the server: 500 internal server error.


At the same time query "/helpdesk/tickets/filter/all_tickets?format=json" returns 200 status code, when using code written below


What I do wrong?


Here is sample: 


final HttpClientBuilder hcBuilder = HttpClientBuilder.create();

final RequestBuilder reqBuilder = RequestBuilder.get();

final RequestConfig.Builder rcBuilder = RequestConfig.custom(); 

    String ticketsUrl = "/helpdesk/tickets/" + ticket_id + ".json";      

    HttpContext hccContext = FreshdeskAPI.getAuthHttpClientContext(

      reqBuilder,

      rcBuilder,

      hcBuilder,

      UriComponentsBuilder

        .fromHttpUrl("https://MY_DOMAIN.freshdesk.com")

        .path(ticketsUrl).build().toString());

    // Execute: 

    RequestConfig rc = rcBuilder.build();

    reqBuilder.setConfig(rc);

    HttpClient hc = hcBuilder.build();

    HttpUriRequest req = reqBuilder.build();

    HttpResponse response = hc.execute(req, hccContext);

Login or Signup to post a comment