0

I keep getting "expecting non-zero value for . ErrorNumber: 17 HttpStatusCode: 400" when i query. I've tried to implement it as close to the example as possible:

Example:

    [Test]
    public void CanQueryDB()
    {
        using (var db = new ArangoDatabase("http://localhost:8529", database: "test"))
        {
            var exDb = db.ListDatabases();
            if (exDb.Contains("test"))
            {
                db.DropDatabase("test");
            }
            db.CreateDatabase("test");


            var obj = new SomeClass() {Key = "1", Text = "Heyheyhey!"};
            _db.Insert<RelevanceContext>(obj);
            Assert.That(() =>

                //How else would you do it?
                _db.Query<RelevanceContext>().Where(x => true).ToArray()

                , Throws.Nothing);
        }
    }

    public class SomeClass
    {
        [DocumentProperty(Identifier = IdentifierType.Key)]
        public string Key;
        public string Text;
    }

Results in:

Test Name:  CanQueryDB
Test FullName:  Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.CanQueryDB
Test Source:    C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs : line 48
Test Outcome:   Failed
Test Duration:  0:00:02,313

Result StackTrace:  at Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.CanQueryDB() in C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs:line 60
Result Message: 
Expected: No Exception to be thrown
  But was:   (expecting non-zero value for <batchSize>. ErrorNumber: 17 HttpStatusCode: 400)
   at ArangoDB.Client.BaseResultAnalyzer.ThrowIfNeeded(BaseResult baseResult)
   at ArangoDB.Client.Cursor.CursorAsyncEnumerator`1.<SetCurrent>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ArangoDB.Client.Cursor.CursorAsyncEnumerator`1.<MoveNextAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at ArangoDB.Client.Utility.TaskUtils.ResultSynchronizer[T](Task`1 task)
   at ArangoDB.Client.Cursor.CursorEnumerator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Xpectra.ReadServiceTests.Contexts.NotesReadModel.NotesEventHandlerTest.<CanQueryDB>b__5_0() in C:\Code\Xpectra\Tests\Xpectra.ReadServiceTests\Contexts\NotesReadModel\NotesEventHandlerTest.cs:line 60
   at NUnit.Framework.Constraints.GenericInvocationDescriptor`1.Invoke()
   at NUnit.Framework.Constraints.ExceptionInterceptor.Intercept(Object invocation)

I'm using ArangoDB.Client v. 0.7.2.1 (latest stable on nuget.org), and running AngoroDB-2.7.0 (win64). I've also tried v. 2.6.9, but it's the same thing.

I can insert and update without any problems

1 Answer 1

1

the problem was for serializing aql options, its fixed now

sorry for any inconvenience caused

download new nuget package at https://www.nuget.org/packages/ArangoDB.Client

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.