30 days of Postman - Day 29 Requests added | TypeError: Cannot read property 'name' of undefined

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

My question:
Hi!
I feel like stuck with Day 29. When I submit the final solution, all tests pass but one -
FAIL
Requests added | TypeError: Cannot read property ‘name’ of undefined
Whan I opened the console I saw message JSONError: Unexpected token u in JSON at position 0
But in Monitors everything ok
Details (like screenshots):


I’ve already tried. Could you help me?

Hi @avionics-cosmologis5

Whats in the response body?




I havent see variable in colection newPayload
If i tab, I see error

You’ve posted everything apart from the request response.

You’ve included the request body, the pre-request script and one of the tests tabs.

Although you haven’t included the code for the “Requests added” test that is failing. Can you include a screenshot of that please? (As well as the request response for the failing test).

I didn’t sent request through button sent. I did the same as in documentation information said (4. through Monitors)
Status I can show from folder “Submit”




If I tab I see error

Do you see your response body in the monitor console log?

I think we need to see what is in “(globals.previousRequest).data” as it looks like its failing to parse it as its reading an unexpected character in position 0. The first line.

It would be useful to write the content of this global variable to the console log. It looks like it needs to valid JSON.


Yes

Thanks for your ansvers, but I can’t understent what I should do. Could you give me hints?

https://www.getpostman.com/collections/75ad098f26628d4b140b

Looking at your screenshot, your webhook works…

If you trigger these HTTP requests in Postman manually, it doesn’t trigger the flow of the webhook, which I suspect is why you end up with the error.

But when you trigger the webhook (via the URL), your screenshot shows that the ‘https://postman-echo.com/post’ call is successful and passes the ‘yellow world’ payload.

The webhook is basically a URL to trigger an event… as far as I can see that works.

This video might help you;

Maybe the test was faild through another error?

I have just read through the tests… That specific failing test is expecting certain names for the HTTP requests created.

In particular “Create Webhook Copy”.

Can you ensure that you have this name instead of say “Create a Webhook”.

1 Like

It’s amazing
Thanks a lot :star_struck:

1 Like