Parsing special characters in short description field of the Incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2019 10:19 AM
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2019 10:44 AM
This sounds like a character encoding issue. Change the field type from String to String (UTF-8)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2019 10:46 AM
And field type- this is common issues as well.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2019 11:57 PM
Changed from String to String UTF-* , it does not solve the problem. Thanks for your reply

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2019 10:45 AM
Hey,
you should decode the REST payload before passing it to the back-end. If this is Global scope use GlideStingUtil.decode(<payload>) or similar thingie.