From 5cc547c1b33358811b1de945c55010fbdb32fae4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 19:31:31 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 9 +++++---- source/Plugins/AyaNova.Plugin.V8/util.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 8ef5046..4d07ccc 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -13,6 +13,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Linq; + namespace AyaNova.PlugIn.V8 { class V8 : IAyaNovaPlugin @@ -195,7 +196,7 @@ namespace AyaNova.PlugIn.V8 ExportDispatchZones(progress); //BIZ objects - ExportUsers(progress); + await ExportUsers(progress); //dumpGlobalSettings(tempArchiveFolder, progress); //dumpLocales(tempArchiveFolder, progress); @@ -213,7 +214,7 @@ namespace AyaNova.PlugIn.V8 } catch (Exception ex) { - progress.Append("Export failed with error:"); + progress.Append("\n************\nExport failed with error:"); progress.Append(ex.Message); } progress.FinishedImport(); @@ -329,7 +330,7 @@ namespace AyaNova.PlugIn.V8 #endregion clients #region users - private async void ExportUsers(ProgressForm progress) + private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress) { //List objectExcludeProperties = new List(standardExcludePropertiesList); @@ -376,7 +377,7 @@ namespace AyaNova.PlugIn.V8 Tagit(c.DispatchZoneID, tags); SetTags(d, tags); - var a = await util.PostAsync("User", d.ToString()); + await util.PostAsync("User", d.ToString()); //JObject xtra = new JObject(); diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index 8cae373..a0842fe 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -152,7 +152,7 @@ namespace AyaNova.PlugIn.V8 var responseAsString = await response.Content.ReadAsStringAsync(); if (!response.IsSuccessStatusCode) { - throw new Exception(responseAsString + "\n" + response.ReasonPhrase); + throw new Exception("POST error, route: " + route + "\n" + responseAsString + "\n" + response.ReasonPhrase); } return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) };