re-added lines lost during json conversion
convert error handling tests to json