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
server: fix assertion error serialization in exec()
Commit e6a2093 ("Add error handling at the server instance") broke
assertion failure reporting in `server:exec()` in case verbose error
serialization is enabled in Tarantool (`box_error_serialize_verbose`
compatibility option is set to `new`).
The problem is with the verbose error serialization, a raw string raised
with `error()` is converted to an error object when marshalled through
IPROTO while the `server:exec()` code expects it to remain a string
because it encodes the original error in JSON. As a result, we get
a mangled error like
```
{"status":"fail","class":"LuatestError","message":"...some_test.lua:42: expected: a value evaluating to true, actual: false"} {"code":32,"type":"LuajitError","trace":[{"file":"./src/lua/utils.c","line":687}]}
```
instead of
```
...some_test.lua:42: expected: a value evaluating to true, actual: false
```
To fix this issue, we revert the aforementioned commit. In order not to
reintroduce #242, we simply rollback the active transaction (if any) in
case the executed function failed.
Closes#376
0 commit comments