RESTResponseV2 haveError Method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017 02:45 AM
Hi,
The RESTResponseV2 haveError method is returning false if the response has HTTP Status 400 - Bad Request. Is this a bug or intended? When exactly is the haveError Method returning true?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2017 02:52 AM
Hi,
haveError()
Indicate if there was an error during the REST transaction.
| Type | Description |
|---|---|
| boolean | Returns true if there was an error, false if there was no error. |
Check this link for documentation
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_RESTResponseV2-haveError
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2017 08:24 AM
I thought that it would be TRUE for any HTTP 400s or 500s codes. I'll have to double-check in my environment...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017 07:46 AM
I actually now observed that it was returning true. It looked liked it was just an error in my script.
