Error in submissions of Postman API Fundamentals Student Expert certification

I’m submitting the postman examples, however, errors returned in the ‘Add a book’ request. However, the errors are referencing what I believe is a request that includes parameters - movies in the request which is not part of ‘adding a book’.


{
“status”: “error”,
“message”: “Your collection failed one or more Postman tests. See the errors array for details.”,
“errors”: [
{
“test”: “[add a book] has script in Tests tab”,
“message”: “Cannot read properties of undefined (reading ‘length’)”
},
{
“test”: “1. [skillcheck] Used POST as the request method”,
“message”: “Cannot read properties of undefined (reading ‘request’)”
},
{
“test”: “2. [skillcheck] Used a query parameter called ‘movieName’”,
“message”: “Cannot read properties of undefined (reading ‘request’)”
},
{
“test”: “3. [skillcheck] Used a base URL variable called {{skillcheckBaseUrl}}”,
“message”: “Cannot read properties of undefined (reading ‘request’)”
},
{
“test”: “4. [skillcheck] Set request auth to “API key” & header to “student-expert"”,
“message”: “Cannot read properties of undefined (reading ‘request’)”
},
{
“test”: "5. [skillcheck] Used a JSON body with 'actorName; ",
“message”: “Cannot read properties of undefined (reading ‘request’)”
},
{
“test”: “6. [skillcheck] Set "favoriteActor" as a collection variable using pm.collectionVariables set(…) in Tests tab script”,
“message”: “Cannot read properties of undefined (reading ‘event’)”
}
]
}

This means it can’t read the response. All of the errors are likely to be related to the same issue.

Check the response for the submit request. It should return your collection as JSON.

I suspect its failing the authentication, or something similar.

Yes, I know it cannot read the response. However, when I submit the same request, I get a successful 201 response. See below the response:

{
“id”: “f976323b-5f38-47e4-92ff-7efed38739b4”,
“title”: “To Kill a Mockingbird”,
“author”: “Harper Lee”,
“genre”: “fiction”,
“yearPublished”: 1960,
“checkedOut”: false,
“isPermanentCollection”: false,
“createdAt”: “2023-07-05T19:08:01.570Z”
}

However, when I submit it back as part of the submission for certification, I get an error. But the errors are the thing that confused me.

“test”: “2. [skillcheck] Used a query parameter called ‘movieName’”,
“message”: “Cannot read properties of undefined (reading ‘request’)”

Talks about a query parameter - ‘movieName’ which is not part of the request. See below:

Request Headers

Content-Type: application/json

api-key: postmanrulz

User-Agent: PostmanRuntime/7.32.3

Accept: /

Cache-Control: no-cache

Postman-Token: 5d2323ea-f429-4557-b0d6-60ebae8eb574

Host: library-api.postmanlabs.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

:arrow_forward:Request Body

{ “title”: “To Kill a Mockingbird”, “author”: “Harper Lee”, “genre”: “fiction”, “yearPublished”: 1960 }

I don’t have access to this course, so I don’t know what it asks.

I’m not even sure if its the same format as the other training courses. (I understand this course was updated recently).

With the other courses, you have a bunch of individual requests that you have to create or amend.

With a separate sub-folder with the submit request.

It doesn’t matter if the individual requests are passing.

It’s the submit request, which should be returning a JSON response of the entire collection details.

The submit request has a bunch of tests in the tests tab that assert on elements within that collection JSON.

I can’t comment on the movieName parameter as I can’t see the course details but the errors are all coming back as undefined which usually means it can’t read the response at all (or its not in the expected format). So my recommendation would be to fix that bit first.

The first step is to check is whether the collection is actually being returned. That you are not getting authentication errors (401) which is the usual suspect here related to how the API key has been added.

Hi,
I’ve resolved the issue - user error. Failing to read the section that describes skill checks which includes movieName.