Submitted collection for the Postman Introduction - HTTP APIs badge failed

Hi! I claimed my Postman Introduction - HTTP API badge on the application page
and then got the following email:

Hey there!

Your submission for the Postman badge failed one or more tests. Please fix the issues, save your changes, then resubmit in order to get your badge.

Check Request 1: Cannot read properties of undefined (reading ā€˜findā€™)

Best regards,

Postman Developer Relations Team

I would like to fix the issue but I donā€™t know how to find the reason for the issue.
What does ā€œCheck Request 1: Cannot read properties of undefined (reading ā€˜findā€™)ā€ mean?
Where can I look for that ā€œRequest 1ā€?

I am also getting the same issue, if you dont mind share ur public collection id or provide a json output
I am getting this to erroes:
Check Request 1: Cannot read properties of undefined (reading ā€˜0ā€™)
Check Request 2: Cannot read properties of undefined (reading ā€˜keyā€™)

Iā€™m running into the same issue with a similar error message and canā€™t identify the root cause.
I reached out to the DevRel team.

I fixed the issue, just manually add api_key and its value and uncheck it

  1. Req

  2. Req

Or u can check my public collection here ā†’
Collection Link click here

Thank you, @Aman_Jain!
It looks like I have the same setting but it doesnā€™t help me.
I think the reason for my issue lives in another place.

1 Like

It can be due to the variable which is not declared and you are accessing it without noticingā€¦:v:

Hi @Aman_Jain !
Thank you for helping me!
I guess I have rechecked everything.
I compared my collection with your collection and did not see anything specialā€¦
I still canā€™t find the reason for the issueā€¦

I got to know, where u are getting error, just add this code to 1st req (Picture of the Day) Test tab all issue will be fixed as it was mandatory to add status check test in 1st req
See my collection carefully for 1st req i have added test code thereā€¦
kindly mark this as solution for others :slightly_smiling_face:

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

Thank you very much @Aman_Jain!
You are absolutely correct - thatā€™s the reason for my issue.
After the fix, it works for me now.

1 Like

Yes itā€™s needed to obtain the badge. To keep it DRY (like mentioned in step 4), it wouldnā€™t be necessary because you already added the test code snippet on the Collection level! :wink:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.