# Day 14 - Getting an error in the test

**URL:** <https://community.postman.com/t/day-14-getting-an-error-in-the-test/41754>\
**Category:** Help Hub\
**Tags:** 30-days\
**Created:** [December 5, 2022, 9:35am UTC](https://community.postman.com/t/day-14-getting-an-error-in-the-test/41754 "2022-12-05T09:35:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yozh150991](https://avatars.discourse-cdn.com/v4/letter/y/ac91a4/32.png) [@yozh150991](https://community.postman.com/u/yozh150991)\
**Post date:** [December 5, 2022, 9:35am UTC](https://community.postman.com/t/day-14-getting-an-error-in-the-test/41754/1 "2022-12-05T09:35:24Z")

</div>

> Here’s an outline with best practices for making your inquiry.

_My question_:  
I’ve set the OAuth 2.0 in the collection - request were sucessful but still I’m getting an error in the test though body is looking correct

_Details (like screenshots)_:

 ![Screenshot_15](https://us1.discourse-cdn.com/getpostman/original/3X/7/7/77866d9a50ba51492a6edf460188164e8b5b43d0.png)  
 ![Screenshot_14](https://us1.discourse-cdn.com/getpostman/original/3X/a/3/a3a7cc34fcd628b4aaef2e2124377016bf02d70f.png)  
 ![Screenshot_13](https://us1.discourse-cdn.com/getpostman/original/3X/3/8/388c632b108f2355a88fa93d86b2c408c11c7ffe.png)

_How I found the problem_:  
During submitting my answer to the postman

_I’ve already tried_:  
Searching forum

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [December 5, 2022, 4:07pm UTC](https://community.postman.com/t/day-14-getting-an-error-in-the-test/41754/2 "2022-12-05T16:07:05Z")

</div>

I wouldn’t normally comment on these “training” exercises, as usually it’s just case of going back over the instructions and ensuring you have followed them to the letter. Telling you the answers sort of defeats the main purpose of training.

However, it would appear that the test is looking for a folder called OAuth, where it looks like you may have set the authorization at the collection level instead. Therefore, the line “let oauthfolder” is probably returning a blank, and the test is correctly reporting “undefined”.

---

<div class="post-metadata">

**Author:** ![gezeitenbrand](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gezeitenbrand/32/14714_2.png) [@gezeitenbrand](https://community.postman.com/u/gezeitenbrand)\
**Post date:** [February 10, 2023, 1:17pm UTC](https://community.postman.com/t/day-14-getting-an-error-in-the-test/41754/3 "2023-02-10T13:17:12Z")

</div>

Awesome, that was exactly my problem. Turns out it helps to read the documentation thoroughly 😅
