postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Postman Collection Runner: Multiple requests failed with `400 Bad Request` error with valid data sets

Open MoorthiRaj opened this issue 8 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

If a data in the CSV file has integer value starting with zero (09874567) then the '0' digit is trimmed when Postman runner fetches the data from CSV file and pass it to the request triggered via Postman Collection/Folder runner

Steps To Reproduce

Prerequisites:

  • Ensure valid input data is stored in a CSV file

userId 0987456 0997456

Steps to reproduce:

  1. Open the Postman tool
  2. Run the Collection/Folder
  3. Verify the postman runner is opened
  4. Select the request (say User Info) and choose the data file
  5. Then run the request

Observations:

  • 2 requests are failed with 400 Bad Request error

Failure Reason:

  • Numbers '0' is trimmed from the fetched data sets

Screenshots or Videos

It's a direct scenario. Issue is easily reproducible so not attached any video recording

Operating System

macOS

Postman Version

11.34.5

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

Generally I suggest everyone in my team as well as in my organization to use Postman tool to complete the API validations very fast in less time. I have given demo and all for the same. But after seeing this issue I was worried. I handpicked the failed cases and ran the requests (more than 15+) one-by-one due to this issue. So kindly fix this issue ASAP

MoorthiRaj avatar Mar 14 '25 15:03 MoorthiRaj

Thank you for reporting this issue and providing detailed reproduction steps. We appreciate your thoroughness.

The behaviour you're experiencing is expected when working with CSV data containing numbers with leading zeros.

As documented in our learning center, you can preserve these values by explicitly setting the column type to 'string' in the data file preview before running your collection.

We understand how critical data integrity is to your workflow. In our upcoming release, we're enhancing the user experience by making the data file preview open by default upon selection, which should improve the visibility of this solution and help prevent similar issues.

If you have any questions about configuring data types or need further assistance, please don't hesitate to reach out.

dashrathky01 avatar Mar 15 '25 06:03 dashrathky01