How to add "Error message " in API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Here is the requirement to add error message for "Change Registration" Modal. (which is used by API users) alone
Example:
Close code: Successful
State: Cancel (4 )----error message should be shown in API users alone not in UI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Sruthi_2511 ,
Can you tell me how are you calling this?
gs.addErrorMessage will display error in UI and gs.error will add to the log.
If you want this to be returned to API, then this should be stored in a field so that API can return error message.
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
seems a duplicate question you already raised where I responded
How to add "Error message " in API Call
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
