result = {'success': False, 'message': ''} try: mgr = ProductManager() r = await mgr.cancel_subscription( subscription_id=params_kw.get('id', '') ) result = r except Exception as e: result['message'] = str(e) debug(format_exc()) return json.dumps(result, ensure_ascii=False, default=str)