Skip to content

Error created with kv version of box.error has invalid name #10708

@locker

Description

@locker

Bug description

Tarantool sets the error name to UNKNOWN if an error is created via:

  • C API box_error_set or box_error_raise.
  • Lua API box.error or box.error.new using kv arguments.

Note that the public C API is also used internally, for example in net.box, so errors raised there lack a proper name, as well.

Reproduced with Tarantool 3.3.0-entrypoint-160-g11145f6a82b1.
The bug was there when the error names first appeared in 3.1.0-entrypoint-236-g2bf957922484.

Steps to reproduce

tarantool> box.error.new(box.error.NO_CONNECTION):unpack()
---
- name: NO_CONNECTION
  code: 77
  base_type: ClientError
  type: ClientError
  message: Connection is not established
  trace:
  - file: '[string "return box.error.new(box.error.NO_CONNECTION)..."]'
    line: 1
...

tarantool> box.error.new{code = box.error.NO_CONNECTION}:unpack()
---
- name: UNKNOWN
  code: 77
  base_type: ClientError
  type: ClientError
  message: Connection is not established
  trace:
  - file: '[string "return box.error.new{code = box.error.NO_CONN..."]'
    line: 1
...

Metadata

Metadata

Assignees

Labels

3.2Target is 3.2 and all newer release/master branches3.3Target is 3.3 and all newer release/master branches3.4Target is 3.4 and all newer release/master branchesappbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions