I'm getting an error when hitting this
asp.net web api endpoint I'm creating:
[HttpGet]
public async Task<IList<Venue>> Search(double lat, double lng, string keyword) {
var venues = await Session.Advanced.AsyncLuceneQuery<Venue>("Place/ByLocationAndKeyword")
.WithinRadiusOf(radius: 5, latitude: lat, longitude: lng)
.AndAlso().Search("Query", keyword)
.ToListAsync();
return venues.Item2;
}
When I hit the endpoint I get an error:
"The remote server returned an error: (412) Precondition Failed."
I suspect the error is from RavenHQ... but I'd like to point out I have another endpoint to load a single venue by id, which seems to be retrieving successfully (have yet to really debug this, but initial calls are returning documents).
Here's the stack trace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Raven.Client.Connection.HttpJsonRequest.<>c__DisplayClassc.<InternalReadResponseStringAsync>b__9() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 128
at Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 351
at Raven.Client.Connection.HttpJsonRequest.<InternalReadResponseStringAsync>b__8(Task`1 task) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 128
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()