Error: Exceeded maxRedirects. Probably stuck in a redirect loop

Is there a way to increase the number of redirects in postman? Or correct this error?

I get this error when I run a POST request. The value of attempts is 150 in the code. But in Postman it seems to stop at 9.

Error: Exceeded maxRedirects. Probably stuck in a redirect loop https://url_here.com/api/Search/WaitUntilDone?taskId=8bf016fd-690a-4884-9baa-f1bea73f7c85&attempt=9

Code:
public async Task WaitUntilDone([FromQuery] Guid taskId, [FromQuery] int attempt = 0)
{
var response = new SearchCaseResponse();

  var task = await TaskContext.GetTaskAsync<SearchCaseTask>(taskId);

  if (task.Completed == null && attempt < 150)
  {
    await Task.Delay(TimeSpan.FromSeconds(1));

    attempt = attempt + 1;

    return RedirectToActionPreserveMethod(actionName: "WaitUntilDone", routeValues: new
    {
      taskId = task.TaskId.Value,
      attempt = attempt
    });
  } 
  else if (task.Completed == null && attempt >= 150)
  {
    response.Error = "Search request has timed out";
    return Ok(response);
  }

  response.Error = task.Error;
  response.CaseList = task.ResultCaseList?.Select(x=>x.ToResponseDto()).ToList();
  response.ResultSource = task.ResultSource;

  return Ok(response);
}

Body:
{
“region”: “gastage”,
“location”: “rockdale:sca”,
“firstName”: “ABC”,
“lastName”: “EFG”,
“bName”: “GA DHS”,
“search”:true
}

Details (like screenshots):

Didn’t know about the field “Maximum number of redirects” under Settings. Default value was 10. Changing that fixed it.

Even after increasing the “Maximum number of redirects” from settings , still getting the same error. can anyone please help ?

Me too. Same problem following a Udemy Tutorial and doing a post to Postgresql/Node.js
Error: Exceeded maxRedirects. Probably stuck in a redirect loop http://localhost:3000/monsters
The data posts 10 times (preset number of timeouts) and I get the error.
If I remove the redirect it posts normally (1x) but it never finishes: Sending request…

router.post(“/”, (request, response, next) => {
const { name, personality } = request.body;
pool.query(
“INSERT INTO monsters(name, personality) VALUES($1, $2)”,
[name, personality],
(err, res) => {
if (err) return next(err);
// response.redirect(“/monsters”); //this is not working! redirect lOOP.
}
);
});

Please restart your network connection.