Problem

The message "hard validation error" appears when trying to create labels.


Cause

This message comes directly from the DHL server and can have several causes:

  • The value of a specific field in the shipment information is invalid (too many characters, some number too small or too large).
  • Address is invalid (e.g. street name does not match the ZIP, etc.). DHL attempts to verify the address in test/sandbox mode too.
  • This can also be caused by a misconfiguration (e.g. wrong address stored in Magento).


"Hard validation error" because

ZIP code is incorrect for the city



Solutions

  1. Check if the name of the affected field is shown next to the message (e.g. street, house number, ZIP). Correct the erroneous information using the "Edit" button for the shipping address.
  2. The weight of the shipment might be too small, see this FAQ article.
  3. If the problem occurs in conjunction with Return Shipments, check this FAQ article.
  4. Incorrect participation numbers can also lead to this error, see this FAQ article.
  5. Check the log file of the module, and search for "error key" or "status message" in it. This will show which information or field was incorrect.


Example log file