Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Parsing special characters in short description field of the Incident table

soibam_ana_sing
Giga Contributor

We are integrating SNOW with a third party software. We would like to update "short description" field in Incident table with the messages comming from third party software. The whole message is made of special characeters/latters/digits ect  and throw error " Failed to decode message" with SNOW REST APIs. 

In case of manually updating description field, it works fine but REST APIs throw error message.

 

Status: 400 Headers: {'Set-Cookie': 'JSESSIONID=313682F13FD6C48FCFE56C38C70A7C2D; Path=/; HttpOnly;Secure, glide_user=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly;Secure, glide_user_session=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly;Secure, glide_user_route=glide.af0c44639e8846b5475107a73fa45221; Max-Age=2147483647; Expires=Sat, 30-Aug-2087 14:20:43 GMT; Path=/; HttpOnly;Secure, glide_session_store=D8A82298DB5333009798AF264896197D; Max-Age=1800; Expires=Mon, 12-Aug-2019 11:36:36 GMT; Path=/; HttpOnly;Secure, BIGipServerpool_dev85551=578902026.54336.0000; path=/; Httponly; Secure', 'Content-Encoding': 'gzip', 'X-Is-Logged-In': 'true', 'X-Transaction-ID': '10a82298db53', 'Pragma': 'no-store,no-cache', 'Cache-control': 'no-cache,no-store,must-revalidate,max-age=-1', 'Expires': '0', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Mon, 12 Aug 2019 11:06:36 GMT', 'X-Cnection': 'close', 'Server': 'ServiceNow', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains'} Error Response: {'error': {'detail': 'Cannot decode: java.io.StringReader@ffbc12', 'message': 'Exception while reading request'}, 'status': 'failure'}

could anyoen give any suggestions to solve this issue ?

 

 

5 REPLIES 5

It is one-way  communication from third party software to SNOW instance. is there python package available for String handling functions "GlideStringUtil". Looks it is not availble  in servicenow packages 

 pip install servicenow