Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proxy] Throw some more informative exception when proxy error occures #1

Open
scale-tone opened this issue May 11, 2015 · 0 comments

Comments

@scale-tone
Copy link
Owner

Maybe check for 407 error code or something like that.

Most of proxies will return their own custom error page in this case, maybe handling XmlException will suit here.

Example exception that happened because of proxy:
System.Xml.XmlException : The 'BR' start tag on line 6 position 30 does not match the end tag of 'FONT'. Line 7, position 3.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext.ReadElement()
at Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext.Read()
at Amazon.Runtime.Internal.Transform.ErrorResponseUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
at Amazon.Runtime.Internal.Transform.JsonErrorResponseUnmarshaller.Unmarshall(JsonUnmarshallerContext context)
at Amazon.DynamoDBv2.Model.Internal.MarshallTransformations.DescribeTableResponseUnmarshaller.UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
at Amazon.Runtime.Internal.Transform.JsonResponseUnmarshaller.UnmarshallException(UnmarshallerContext input, Exception innerException, HttpStatusCode statusCode)
at Amazon.Runtime.AmazonWebServiceClient.handleHttpWebErrorResponse(AsyncResult asyncResult, WebException we)
at Amazon.Runtime.AmazonWebServiceClient.getRequestStreamCallback(IAsyncResult result)
at Amazon.Runtime.AmazonWebServiceClient.endOperation(IAsyncResult result)
at Amazon.DynamoDBv2.AmazonDynamoDBClient.EndDescribeTable(IAsyncResult asyncResult)
at Amazon.DynamoDBv2.AmazonDynamoDBClient.DescribeTable(DescribeTableRequest describeTableRequest)
at Amazon.DynamoDBv2.DocumentModel.Table.GetTableInfo()
at Amazon.DynamoDBv2.DocumentModel.Table.LoadTable(AmazonDynamoDB ddbClient, String tableName, DynamoDBConsumer consumer)
at Amazon.DynamoDBv2.DocumentModel.Table.LoadTable(AmazonDynamoDB ddbClient, String tableName)
at Linq2DynamoDb.DataContext.DataContext.GetTableDefinition(Type entityType) in DataContext.cs: line 182
at Linq2DynamoDb.DataContext.DataContext.GetTable(Object hashKeyValue, ITableCache cacheImplementation) in DataContext.cs: line 95
at Linq2DynamoDb.DataContext.DataContext.GetTable() in DataContext.cs: line 66
at Linq2DynamoDb.DataContext.Tests.BasicQueryTests.DataContext_Query_ReturnsValidDataFromDynamoDb() in BasicQueryTests.cs: line 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant