# Incorrect parameter value in request in runner

**URL:** <https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555>\
**Category:** Help Hub\
**Tags:** runner, dynamic-variable\
**Created:** [February 12, 2024, 9:46am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555 "2024-02-12T09:46:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 9:46am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/1 "2024-02-12T09:46:28Z")

</div>

When I use [pre-defined variables](https://learning.postman.com/docs/writing-scripts/script-references/variables-list/) in request body value of parameter in request in runner is incorrect 😮

I am attaching screenshots to explain.  
variable in body:

 ![requestBody](https://us1.discourse-cdn.com/getpostman/original/3X/c/1/c17bef104d5e88913fdff20c697e4efc3a4bfdf9.png)  
**Request** and Response in Runner:  
 ![responseRequestRunner](https://us1.discourse-cdn.com/getpostman/original/3X/4/5/4572222ad24879f9dcca2a8427e44dd0489741d3.png)  
logs:  
 ![logPostman](https://us1.discourse-cdn.com/getpostman/original/3X/e/e/ee3f282239f04e60825708738a123ff76b8ac9bb.png)

Why is it? Why value in request does not match the actual sent value? It restarts the variable generation?  
Is it a bug?

---

<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:** [February 12, 2024, 9:59am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/2 "2024-02-12T09:59:30Z")

</div>

This will be down to the specific API. The API will determine what is returned.

Do you have documentation for this API?

Is it an in-house developed API, or it looks like a faker\mock library.

If its a fake\mock library. What are the matching rules that define what is returned?

As a test, change the dynamic variable to something static. You could use “interface” again, and see what is returned. I suspect it will be the same, so the problem isn’t with the dynamic variable.

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 10:04am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/3 "2024-02-12T10:04:12Z")

</div>

to illustrate this case, I took this API  
[https://fakerestapi.azurewebsites.net/index.html](https://fakerestapi.azurewebsites.net/index.html)  
but I noticed the same behavior when working with my API

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 10:08am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/4 "2024-02-12T10:08:19Z")

</div>

> [@michaelderekjones](#):
>
> As a test, change the dynamic variable to something static. You could use “interface” again, and see what is returned. I suspect it will be the same, so the problem isn’t with the dynamic variable.

When I use static value it is correct

 ![staticTitle](https://us1.discourse-cdn.com/getpostman/original/3X/2/8/282f618ad4330438e2ddf91570aaa091032766ab.png)  
 ![staticTitleRunner](https://us1.discourse-cdn.com/getpostman/original/3X/c/8/c8cb5c8e6b7f92b6442eb554f7479d89af3cf181.png)

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 10:12am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/5 "2024-02-12T10:12:39Z")

</div>

But if I use any random value, when I run request by Runner, it show incorrect Request value

 ![runnerIncorrect](https://us1.discourse-cdn.com/getpostman/original/3X/b/7/b7d65e3991cf9158ac07cba83b1b92ba2a0c7277.png)  
 ![randomOk](https://us1.discourse-cdn.com/getpostman/original/3X/6/a/6a2b983b5af3f2b03099eaac4372c53d9a47d346.png)

---

<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:** [February 12, 2024, 10:24am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/6 "2024-02-12T10:24:51Z")

</div>

By looking at the console logs. In the second screenshot, it appears that “mobile” was sent instead of “virtual”. The console log is probably going to be king here.

Can you clear the console logs, and run a single request (not via the runner) and then check the console log for the request and response. Do they match?

Then use the collection runner and again check the console log to see what was sent and received, and then match against the collection runner logs.

It looks like the console log is showing the correct details, and the collection runner log is showing something else.

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 10:49am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/7 "2024-02-12T10:49:41Z")

</div>

[https://jam.dev/c/175a84f4-4b86-4c48-8fa3-618b42fe37e5](https://jam.dev/c/175a84f4-4b86-4c48-8fa3-618b42fe37e5)  
I record screencast to show case

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 10:57am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/8 "2024-02-12T10:57:31Z")

</div>

> [@michaelderekjones](#):
>
> it appears that “mobile” was sent instead of “virtual”

Oh, sorry, misunderstanding. There is two different request:

1. From Runner to show incorrect value - “virtual”. When value was “online”.
2. From tab with Request to show that API works fine, console shows correct value that match the actual value - “mobile”.

---

<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:** [February 12, 2024, 11:08am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/9 "2024-02-12T11:08:41Z")

</div>

It looks like when its run in the runner, the details in the console log are different to what is being recorded in the “persist details” screen.

The request and response in the console logs are consistent.

I don’t know why they are showing different details. I only noticed that you didn’t save the request before running it the final time.

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 11:17am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/10 "2024-02-12T11:17:45Z")

</div>

> [@michaelderekjones](#):
>
> I don’t know why they are showing different details. I only noticed that you didn’t save the request before running it the final time.

When I didn’t choose “Persist responses for a session”, whatever values are different. But in this case I can’t see Request runner log, only Response that incorrect 🫠

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 12, 2024, 11:23am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/11 "2024-02-12T11:23:41Z")

</div>

Were you rerunning the runner, after making a change in the request tab?

Unless you save the changes in the request, the runner won’t pick up that change and would still be using the old saved value.

Enabling the Autosave will help here:

 ![Screenshot_20240130_050213](https://us1.discourse-cdn.com/getpostman/original/3X/9/f/9fc048c0ef6181ac758305e7df1dc6e413da237d.jpeg)

---

<div class="post-metadata">

**Author:** ![supply-astronomer-38](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/supply-astronomer-38/32/27405_2.png) [@supply-astronomer-38](https://community.postman.com/u/supply-astronomer-38)\
**Post date:** [February 12, 2024, 11:50am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/12 "2024-02-12T11:50:37Z")

</div>

> [@danny-dainton](#):
>
> Were you rerunning the runner, after making a change in the request tab?

Yes, I always push Ctrl+S after make change. Otherwise the request would have remained static data (in this case, screencast may show)

But I tried Autosave and this solve the problem 😮

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 13, 2024, 11:51am UTC](https://community.postman.com/t/incorrect-parameter-value-in-request-in-runner/57555/13 "2024-03-13T11:51:06Z")

</div>

Closed on March 13, 2024, 11:51am UTC

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