Add exception handler for JSON operation.