12-12-23 04:19 PM
Hi every Body,
I try to update a ticket on EasyVista via an API call but it does not work, it works very well via PostMan but with the action which I created in my web service I have this error :
Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 590
HTTP Response Content: {
"type": "about:blank",
"title": "Internal Easyvista Error",
"status": 590,
"message": "An internal error occurred.\r\n Please try again later or contact the system administrator.",
"correlationId": "657832bd35275",
"instance": "/api/v1/50004/actions/S230131_072"
}
You Can find more explication with picture Attachment.
Answered! Go to Answer.
15-12-23 08:25 PM
Hi Slimane,
Yes, you can configure that header in your web service (Valider un Ticket > Request > Headers) like so:
Name: Content-Type
Value: application/json; charset=utf-8
application/json
to see if that works as well. I have seen variation from different APIs.13-12-23 04:29 PM
Hi Slimane,
An HTTP status code in the 500 range such as this usually means there is a problem on the server side, but I have also found it to mean the request you are sending is malformed in a way that the server is not handling.
It looks like you have an input parameter named Corps that seems to contain a JSON request body. I suggest in your web service action (Valider un Ticket > Request) to select Template on the Body Content drop down, and then enter [Corps]
in the text field (as pictured below, for example). I have seen instances where a missing request body on a PUT request like this will cause a 500-level error.
13-12-23 07:36 PM
Hi Charlie,
I appreciate you replay, I flowed your advice, howerver, I have got, tow types of errors,
I have got this error when I checked the "Disable Sending of Request"
PUT https://edfreit-stg.easyvista.
Content-Type: text/plain; charset=utf-8
Authorisation: Basic *********************************
Authorization: Basic ********************************
{
"end_action": {
"doneby_mail": "mycompagnymail@compagny.com"
}
}
And this error when I Unchecked "Disable Sending of Request" :
Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 590
HTTP Response Content: {
"type": "about:blank",
"title": "Internal Easyvista Error",
"status": 590,
"message": "An internal error occurred.\r\n Please try again later or contact the system administrator.",
"correlationId": "657a02f87bc59",
"instance": "/api/v1/50004/actions/
}
Thank you for your helping
------------------------------
SLIMANE OUZIALA
Consultant
Arondor Capture
Europe/Paris
------------------------------
14-12-23 04:58 PM
Hi Slimane,
The first output you shared from the "Disable Sending of Request" checkbox is the handy debug information we want to examine. 🙂 In particular, it is showing us the headers that are included in the request.
Headers:
Content-Type: text/plain; charset=utf-8
Authorisation: Basic *********************************
Authorization: Basic ********************************
One thing I notice is you have two auth headers, one called Authorisation and another called Authorization. I suspect you only need to include one of these in your request. I assume in your web service you have configured authorization in the Common Authentication page which will automatically add an Authorization header to your request. You may also have defined another auth header in the specific action for your web service (Actions > Valider un Ticket > Request > Headers). If you have something for authorization there, I recommend removing it and seeing if your request works.
Another possible issue is the other header, Content-Type. It is set to a value of text/plain; charset=utf-8
but it may need to be changed to application/json; charset=utf-8
since your request body is JSON-formatted. However, I say that without seeing the documentation for this particular API, so I am speculating here. In my experience, I have seen some APIs are sensitive to this header being absolutely correct.
------------------------------
Charlie Kovacs
Sr. Digital Exchange Engineer
Blue Prism
Austin, USA
------------------------------
14-12-23 11:27 PM
Hi @Charlie
Smart analyze thank you for your investigation,
Yeah, I have tow Authorization, I deleted one.
I think the mater problem is the Content-Type. becauce with Postman i dont have this problem for this call API because I Identify Json type in the body of my request.
But, my question, where can I change the type of the request in the blue prism from text/plain; charset=utf-8
to application/json; charset=utf-8 ?
Thank you in advance
15-12-23 08:25 PM
Hi Slimane,
Yes, you can configure that header in your web service (Valider un Ticket > Request > Headers) like so:
Name: Content-Type
Value: application/json; charset=utf-8
application/json
to see if that works as well. I have seen variation from different APIs.16-12-23 12:18 AM
Bonjour @Charlie,
It works very well, with the first option :
Nom:Content-Type
Valeur:application/json; charset=utf-8
Thank you very much; thank you for your help and your patience
the problem was the value of my content-Type of my request