Fixing broken JSON within error message. Added TODO for future work