My collection failed in Newman, Even though collection Runs successfully in Postman Runner

Hi,
i have collection and it’s runs successfully in postman Runner, and Failed in Newman
i have exported both Collection and Sessions , and passed the same value in Newman Request

newman run collection1.json -e session.postman_environment.json -r htmlextra.

newman run collection1.json -e session.postman_environment.json -r htmlextra --delay-request-100

And My Scripts are Failing in Newman,
Response Code: 422 - Unprocessable Entity
Please advise , What changes needs to be done.

Hey @Roshin_08

Without more context about the requests in the collection, it’s tough to offer any solid solutions here.

Are these local requests that using the -k are there are redirects that are automatically followed that --ignore-redirects could help with?

Can you can any extra information from the Newman run by adding the built in CLI reporter -r cli,htmlextra ?

We Tried with Extra data, below is the screenshot.

Also might need to change the test name or the value it’s checking for - is it 200 or 201? :smiley:

Just going back to my other point:

Without more context about the requests in the collection, it’s tough to offer any solid solutions here.

The image doesn’t tell us a great deal about what that request is doing, other than something errored.

Have you tried looking at the request or response details for any clues about the differences between the app and newman?

Is the transaction request timing out after a certain amount of time when using Newman?

Does using --timeout-request <time is ms> help?