HTTP 422 on a Valid Upload: Check Meaning Before Reformatting the JSON
An industrial data upload parses as JSON but receives HTTP 422. Repeatedly reformatting whitespace may leave the actual problem untouched. Read the endpoint's validation response and compare the submitted meaning with the documented contract before changing values or resending the batch.

Key takeaways Syntactically valid content can still contain instructions the service cannot process. Preserve the original record and investigate the documented validation rule.
1. Separate syntax from meaning
RFC 9110 defines 422 Unprocessable Content for a request whose content type is understood and whose syntax is correct, but whose contained instructions cannot be processed. This definition does not provide a universal list of field errors. The specific API contract and response determine the useful next investigation.
Record the method, endpoint, status and permitted error details. Keep the original source record linked to the submitted representation. Do not publish credentials or personal information in troubleshooting logs. A client library may label several failures as invalid data, so obtain the actual returned status before deciding which layer failed.
2. Read the documented validation rule
Check required identifiers, permitted units, timestamp interpretation and relationships between fields against the actual interface specification. These are investigation candidates, not claims that every API validates the same conditions or returns the same error format. Preserve the distinction between a rejected request and a transport failure.
If the error identifies a field, trace that field back to its source and transformation. A valid number might have been attached to the wrong measurement key. Changing it to a convenient default can make a later request pass while losing the engineering meaning. Resolve the mapping rather than concealing the discrepancy.

3. Work a hypothetical mismatch
Suppose an authorised test endpoint requires a documented asset key. The client sends a display label instead, and the service returns a validation explanation with 422. The label is valid text and the JSON is valid, yet the request does not satisfy the asset reference contract. Correct the mapping using verified identity evidence.
Retain both the rejected submission and the approved correction in the test record. Do not infer from a single request-level response that some rows were accepted or that none were stored unless the contract states the batch outcome. Determine the transaction boundary before any retry that could create duplicate records.
Observation | Check next |
JSON parses; 422 returned | Read documented validation details. |
Corrected value passes | Verify that engineering meaning was preserved. |
Batch outcome unclear | Reconcile before resubmitting. |
4. Build a controlled correction test
Use non-production examples covering a valid record, a documented invalid field and a missing relationship where applicable. Confirm that the client presents a useful unresolved state and retains enough evidence for support. Avoid a loop that endlessly submits the same uncorrected content.
After an authorised correction, verify the service's documented acceptance result and reconcile it with the source. A new success status does not excuse an incorrect unit or asset mapping. Include the downstream report in acceptance checks if that report drives operational decisions. Keep safety-critical decisions subject to application-specific engineering validation.
5. Recommended related solutions
Review the ProSight Software overview for the required monitoring outcome and discuss the exact validation and reconciliation workflow through ProSight Custom. Do not assume that a particular endpoint, validation schema or batch recovery feature is supplied with every deployment.
Provide a sanitised rejected record, the current contract and the observed validation response. Identify which transformation is suspected and which outcome must be demonstrated. That supports a specific integration assessment without advertising an unverified software capability.
Practical FAQs
Does 422 mean the JSON cannot be parsed?
Its defined semantics distinguish correct syntax from instructions the service cannot process. Verify the actual service response and contract.
Can I retry the same batch unchanged?
First resolve the validation issue and establish the documented batch outcome and retry behaviour.
Technical reference
Protocol definitions are from the primary reference. The hypothetical tests and handover checks are project engineering recommendations; confirm the exact device or endpoint contract.



.png)
Comments