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.

Error logging for inbound data stream

Shusovit Dutta
Tera Contributor

We are creating users based on a GET API in a data stream. But what if some users are not created due to some mandatory field missing what mechanism I can configure so that the other integration team knows that out of 10 8 users are created and 2 users were not created due to some reason. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Shusovit Dutta 

the docs say there is error evaluation for Data Stream, see if that helps

Data Stream actions and pagination 

AnkurBawiskar_0-1765270552098.png

OR

You will have to use script step and use try catch block to know the error thrown and then when it goes to catch block add data to some custom table which will say which users were created and which failed

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Shusovit Dutta 

the docs say there is error evaluation for Data Stream, see if that helps

Data Stream actions and pagination 

AnkurBawiskar_0-1765270552098.png

OR

You will have to use script step and use try catch block to know the error thrown and then when it goes to catch block add data to some custom table which will say which users were created and which failed

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader