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
I am trying to get response from lua function and got exception with lua nil value or msgpack.NULL:
// C# code
using TaskModel = global::Tarantool.Client.Model.Tuple<int, string, string>;
using TimeOutModel = global::Tarantool.Client.Model.Tuple<string, int>;
var result = await this.box.Call<TimeOutModel, TaskModel>(TarantoolFunctionNames.TakeQueueItemFunctionName, Tuple.Create(queueName, timeout));
// Lua code
local function take_queue(queueName, timeoutSeconds)
result = queue.tube[queueName]:take(timeoutSeconds)
log.info("take from queue %s. result is %s", queueName, result)
if(result == nil) then
log.info("return NULL %s",msgpack.NULL)
return msgpack.NULL
end
return result
end
Exception:
System.ArgumentException : Invalid array length: 3 is expected, but got 1. at Tarantool.Client.LogicalConnection.<SendRequestImpl>d__112.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 Tarantool.Client.LogicalConnection.<SendRequest>d__72.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 Tarantool.Client.Box.<Call>d__82.MoveNext()
Expected behavior: no exceptions, result.Data = empty array || null
The text was updated successfully, but these errors were encountered:
anton-putau
changed the title
Handle nil result from lua function
Handle nil (msgpack.NULL) result from lua function
Oct 24, 2016
Uh oh!
There was an error while loading. Please reload this page.
I am trying to get response from lua function and got exception with lua nil value or msgpack.NULL:
Exception:
System.ArgumentException : Invalid array length: 3 is expected, but got 1. at Tarantool.Client.LogicalConnection.<SendRequestImpl>d__112.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 Tarantool.Client.LogicalConnection.<SendRequest>d__72.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 Tarantool.Client.Box.<Call>d__82.MoveNext()
Expected behavior: no exceptions,
result.Data = empty array || null
The text was updated successfully, but these errors were encountered: