Simplify JSON Prepare and handle unhandled http exceptions