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
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ā.