8000 schema: error message for an array instead of a record · Issue #10242 · tarantool/tarantool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
schema: error message for an array instead of a record #10242
@mandesero

Description

@mandesero

If a record field is expected in a config field, and an array is received instead, it would be great to get a more detailed and informative error message, rather than a hard-to-understand error being thrown.

credentials:
  users:
    me:
	  passwd:
        plain: secret
      grant: [super]

groups: 
  g:
    replicasets:
      r:
        instances:
          i:
            iproto: [1,2,3]
$ tarantool --name i --config config.yaml
LuajitError: [cluster_config] groups.g.replicasets.r.instances.i.iproto: Unexpected field "1"
fatal error, exiting the event loop

The goal is to provide a detailed, user-friendly error message for example

LuajitError: [cluster_config] groups.g.replicasets.r.instances.i.iproto: Unexpected data: Expected "record", got "array": [1, 2, 3]
fatal error, exiting the event loop

This issue is a continuation of issue #10241

Corresponds to TNTP-240.

Metadata

Metadata

Labels

3.3Target is 3.3 and all newer release/master branchesconfigfeatureA new functionalityverbosityissues related to Tarantool's user friendliness

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0