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
{{ message }}
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
In some cases (and I haven't been able to determine when this happens) MailChimp returns an error page instead of an API response - html instead of json. Possibly when the service is down?
MailChimpManager throws SerializationException when this happens.
It would be nicer to get a MailChimpAPIException of some kind, ideally including the first n characters of the page body.
This is the exception we get:
System.Runtime.Serialization.SerializationException : Type definitions should start with a '{', expecting serialized type 'ApiError', got string starting with: <HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>
An e...
The text was updated successfully, but these errors were encountered:
This is a great point. It'd be nice if we could get an easily reproducible case. The next time this happens, can you see if it's dropping into this exception handler here?
If it is, we could probably add another check to see if it's a JSON based response or not. First 'n' characters of the page body might be a bit interesting to pull out (do you have an HTML parser in mind for that?)
Yes, it looks like that's where we end up. Here's my stack trace:
System.AggregateException: One or more errors occurred. ---> System.Runtime.Serialization.SerializationException: Type definitions should start with a '{', expecting serialized type 'ApiError', got string starting with: <HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY> An e
at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(Type type, String strType, EmptyCtorDelegate ctorFn, Dictionary`2 typeAccessorMap)
at ServiceStack.Text.JsonSerializer.DeserializeFromString[T](String value)
at MailChimp.MailChimpManager.MakeAPICall[T](String apiAction, Object args)
at ReQtest.Data.Commands.MailChimp.MailChimpApiFacade.<>c__DisplayClass12.<BatchSubscribeToList>b__e() in c:\TeamCity\buildAgent\work\5df5e08f77af18ac\src\WebApp\ReQtest.Data\Commands\MailChimp\MailChimpApiFacade.cs:line 96
at System.Threading.Tasks.Task`1.InvokeFuture(Object futureAsObj)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In some cases (and I haven't been able to determine when this happens) MailChimp returns an error page instead of an API response - html instead of json. Possibly when the service is down?
MailChimpManager throws SerializationException when this happens.
It would be nicer to get a MailChimpAPIException of some kind, ideally including the first n characters of the page body.
This is the exception we get:
The text was updated successfully, but these errors were encountered: