Provide error details through payload fields
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/tarantool/issues/9108, https://github.com/tarantool/tarantool/issues/6166
Product: Tarantool
Since: 3.1
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_error/
SME: @ nshy
Details
Now Tarantool error details are available as payload fields (which
in turn can be accessed as error object fields). For example:
tarantool> e = box.error.new(box.error.SPACE_EXISTS, 'some space')
tarantool> e.message
---
- Space 'some space' already exists
...
tarantool> e.space
---
- some space
...
One can introspect the details using error:unpack():
tarantool> e:unpack()
- space: some space
code: 10
base_type: ClientError
type: ClientError
message: Space 'some space' already exists
trace:- file: '[string "e = box.error.new(box.error.SPACE_EXISTS, ''so..."]'
line: 1
...
Requested by @ nshy in https://github.com/tarantool/tarantool/commit/7410a4f0f29114bda675e8bffe4eca611e85c3f4.
- file: '[string "e = box.error.new(box.error.SPACE_EXISTS, ''so..."]'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the root box_error documentation and compare its current coverage with the payload-field and error:unpack() examples in this issue. Document access to error details and introspection, then verify that the examples accurately describe the Tarantool 3.1 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100