Day20 - FAIL AssertionError: check header description

Q re: - Day20 Documentation

I am trying to understand what this test is looking for:

  if (firstRequest.request.header) {
        firstRequest.request.header.forEach( (header) => {
            pm.expect(header.description, 'check header description').to.exist

Here’s the documentation:

…I get FAIL Documentation added correctly | AssertionError: check header description: expected undefined to exist.

I can’t seem to figure out if the test is looking for header info, if so how to write it, or what ‘undefined to exist’ means…


Do you have a description for a request header that you have added? That should only run that check if you have added a header to the request.

Can you share an image of the Headers?

yea, sorry,

I really don’t understand this.

I thought the test was for an existing header, that I thought I entered using CURL (BLUE)

RED is just there - I can’t add/change it

YELLOW is the header of the call.

Because you have a Header in there (the Accept one at the botton), which is not the auto generated ones, it requires a description (the column next to the vakue).

WOW - you did it again Danny! IDK if I would have figured that out!

Making the description mandatory is really smart documentation-wise!

Thanks again!

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