Try-wrap JSON parsing only, close session on error