USEPA / e-manifest

API services documentation and reference material for the e-Manifest hazardous waste tracking system
https://www.epa.gov/e-manifest
Creative Commons Zero v1.0 Universal
26 stars 22 forks source link

EM-3088 Federal Waste Codes Incorrectly Saving when epaWaste = false #1599

Closed e-manifest closed 7 months ago

e-manifest commented 8 months ago

When providing a manifest JSON to the Save, Update, Correct services, there is a check for {{epaWaste = false}} and the presence of Federal Waste Codes. If Federal Waste Codes are present, there's a warning

{code:json} "warnings": [ { "field": "Emanifest.waste.hazardousWaste.federalWasteCode", "message": "Federal waste codes shall not be provided for non-hazardous waste" } ]{code}

The warning is expected, which is good, however, the Federal Waste Codes are still saving as evidenced by retrieving the manifest via the GET service

{code:json} "hazardousWaste": { "federalWasteCodes": [ { "code": "D001", "description": "IGNITABLE WASTE" } ], "tsdfStateWasteCodes": [], "generatorStateWasteCodes": [] },{code}

JSON example to provide to the Save, Update or Correct service.

[^EM-3088.json]



Acceptance Criteria
(x) When providing JSON to the Save, Update or Correct service, if {{"epaWaste": false}} is provided for a given waste line and a valid code under {{federalWasteCodes}} is provided, then the {{federalWasteCodes}} are ignored (not saved) and warning is returned

{code:json} "warnings": [ { "field": "Emanifest.waste.hazardousWaste.federalWasteCodes", "message": "Federal waste codes shall not be provided for non-hazardous waste" } ]{code}