Newman report getting -expected object (id _details ...) to have property 'code'

I have created postman collection locally used Test 200 assertion. it’s working as expected. While generating the newman report same request response message error shows

expected object (id _details …) to have property ‘code’

for 200 response code validation

Anyone having solution

Hi @technical-geologist6
Could you share some screenshots of what you’re seeing?

Check in the console logs if you are getting the expected response back from the server.

Hi, Please find the below snapshot.

note: I have checked in console and the response value is displaying in console ( came from server). Response details is not captured/displayed in newman report so this following error is displaying " expected { Object (id, _details, …) } to have property ‘code’ "

@danny-dainton - Could you please provide your insight on the above error?

1 Like

What’s the output from the CLI reporter for the request?

newman run collection.json -r cli

The report is generated based on the same information coming from Newman, there isn’t any manipulation of the data presented in the report. It just happens to be displayed it a more visual way.

Also, in isolation, it’s difficult to know what’s going on as we cannot see the actual request you’re making, the version of Node or the version of Newman that you’re using.

1 Like

@danny-dainton - Thank you for your response! I could see this error ’ self signed certificate in certificate chain ’ while running the collection from command prompt. so I ran the connection with --insecure command. it is working fine now.


Hey man
Thanks a lot
I spent 1 week like a mad person and --insecure did resolve my issue.
Awesome. Thankyou !!!

getting same error but its not working if I am using --insecure command.Can you please hekp on this??