Error : commodityCodes/0/value: expected maxLength: 18, actual: 20

Created by Aravind Kumar, Modified on Fri, 31 Oct at 12:15 AM by Aravind Kumar

Issue Description

When processing export declarations, you may encounter the following error:

Error: #/content/exportDeclaration/lineItems/16/commodityCodes/0/value: expected maxLength: 18, actual: 20

This error indicates that one of the data fields exceeds the allowed maximum character length.

Root Cause

The issue occurs when the HARMONY_NUMBER (also known as the Harmonized System Code or HS Code) exceeds the character limit defined by the system.

  • The maximum allowed length for HARMONY_NUMBER is 18 characters.

  • If the value contains more than 18 characters, the system throws the above validation error.

How to Identify the Problematic HARMONY_NUMBER

To verify which HARMONY_NUMBER is causing the issue:

  1. Open your browser’s Developer Tools:

    • Right-click on the screen and select Inspect, or press F12.

  2. Navigate to the Network tab.

  3. Search for the Job API request — usually labeled as Jobapi or something similar.

  4. Expand the request details and use the search bar to look for the keyword:

    harmony_number
  5. Review the value returned.

    • If it contains more than 18 characters, it is the source of the error.

Resolution

Once you have identified the invalid HARMONY_NUMBER:

  1. Confirm the value length — ensure it exceeds the 18-character limit.

  2. Contact the Hach Team and request a valid HARMONY_NUMBER that adheres to the system limit.

    • Provide the current (invalid) code.

    • Mention the export declaration or line item reference where the issue occurred.

Example

Invalid Value: 12345678901234567890 (20 characters)
Allowed Value: 123456789012345678 (18 characters)


How to correct the data.


Lineitem table > DataID > LineitemData table > in Json we need to edit.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article