catch more JSON-encoding exceptions