You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the Get method to get SubscriberDetail it fails if the email doesn't exist in the list.
If the user/email doesn't exist in the list I would expect it to return null.
If the user/email exists in the list (e.g. active or deleted) it returns an object with the correct state, but if the use doesn't already exist in the list, it doesn't continue in the code. E.g. in the following code sample the code doesn't reach the code with customFields or subscribe, which is not executed - only when the user/email already exists in the list.
I know the line with SubscriberDetail in the case is not necessary to subscribe the user to the list and if I remove this line it also works to subscribe users, who are not already in the list. However this line shouldn't prevent the rest of the code to be executed.
Subscriber subscriber = new Subscriber(_auth, _listId);
SubscriberDetail sd = subscriber.Get(model.Email);
List<SubscriberCustomField> customFields = new List<SubscriberCustomField>();
customFields.Add(new SubscriberCustomField() { Key = "AccountCreated", Value = "Ja" });
subscriber.Add(model.Email, null, customFields, true);
I guess it somewhere in this method fails to get the email/user or because the request fails.
2017-11-21 08:24:11,143 [P18232/D13/T834] ERROR Test.Library.Helpers.CampaignMonitor - CampaignMonitor Error - status code: 203
createsend_dotnet.CreatesendException: The CreateSend API responded with the following error - 203: Subscriber not in list or has already been removed.
ved createsend_dotnet.HttpHelper.MakeRequest[T,U,EX](String method, AuthenticationDetails auth, String path, NameValueCollection queryArguments, T payload, String baseUri, String contentType) i c:\Users\terryt\Projects\createsend-dotnet\createsend-dotnet\HttpHelper.cs:linje 222
ved createsend_dotnet.HttpHelper.Get[U,EX](AuthenticationDetails auth, String baseUri, String path, NameValueCollection queryArguments) i c:\Users\terryt\Projects\createsend-dotnet\createsend-dotnet\HttpHelper.cs:linje 44
ved createsend_dotnet.CreateSendBase.HttpGet[U,EX](String path, NameValueCollection queryArguments) i c:\Users\terryt\Projects\createsend-dotnet\createsend-dotnet\CreateSendBase.cs:linje 61
ved createsend_dotnet.Subscriber.Get(String emailAddress) i c:\Users\terryt\Projects\createsend-dotnet\createsend-dotnet\Subscriber.cs:linje 19
If I use the
Get
method to getSubscriberDetail
it fails if the email doesn't exist in the list.If the user/email doesn't exist in the list I would expect it to return null.
If the user/email exists in the list (e.g. active or deleted) it returns an object with the correct state, but if the use doesn't already exist in the list, it doesn't continue in the code. E.g. in the following code sample the code doesn't reach the code with customFields or subscribe, which is not executed - only when the user/email already exists in the list.
I know the line with
SubscriberDetail
in the case is not necessary to subscribe the user to the list and if I remove this line it also works to subscribe users, who are not already in the list. However this line shouldn't prevent the rest of the code to be executed.I guess it somewhere in this method fails to get the email/user or because the request fails.
createsend-dotnet/createsend-dotnet/Subscriber.cs
Lines 16 to 23 in c9ea4ea
The text was updated successfully, but these errors were encountered: