Create one more Entity and associate it with Header with another Navigation Property.
Enhance the existing Deep Structure at the back end with the above Navigation Property to define the table.
Finally fill the error details of each line item and sent back your deep structure as response which had all information.
This way you can get GW response having error/success for each line item along with the input which sent as part of Deep Entity Creation.