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

Fixed empty error message if query parsing fails from unexpected exception. #574

Merged
merged 3 commits into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Microsoft.Azure.Cosmos/src/Query/QueryPartitionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,19 @@ internal PartitionedQueryExecutionInfoInternal GetPartitionedQueryExecutionInfoI
if (exception != null)
{
DefaultTrace.TraceInformation("QueryEngineConfiguration: " + this.queryengineConfiguration);
string errorMessage;
if (string.IsNullOrEmpty(serializedQueryExecutionInfo))
{
errorMessage = $"Message: Query service interop parsing hit an unexpected exception: {exception.ToString()}";
}
else
{
errorMessage = "Message: " + serializedQueryExecutionInfo;
}

throw new CosmosException(
HttpStatusCode.BadRequest,
"Message: " + serializedQueryExecutionInfo);
errorMessage);
}

PartitionedQueryExecutionInfoInternal queryInfoInternal =
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#558](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/558) LocationCache ConcurrentDict lock contention fix
- [#561](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/561) GetItemLinqQueryable now works with null query
- [#567](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/567) Query correctly handles different language cultures
- [#574](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/574) Fixed empty error message if query parsing fails from unexpected exception

## [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.0.0) - 2019-07-15

Expand Down