Skip to content

parse error type and category them to show information clearly #8

Description

@sn0wfree

when execute a sql or query, received a error code from server and show correspond information. no general database error!

>>> ch('show database')

>>> DatabaseError: b"Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 6 ('database'): database format JSONCompact. Expected one of: TABLES, GRANTS, CREATE, ACCESS, QUOTA, CURRENT ROLES, PRIVILEGES, PROCESSLIST, CURRENT QUOTA, ENABLED ROLES, CREATE, DICTIONARIES, QUOTAS, ROW POLICIES, POLICIES, SETTINGS PROFILES, PROFILES, ROLES, USERS (version 20.9.3.45 (official build))\n"

change to

>>> ch('show database')

>>> SyntaxError: b"Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 6 ('database'): database format JSONCompact. Expected one of: TABLES, GRANTS, CREATE, ACCESS, QUOTA, CURRENT ROLES, PRIVILEGES, PROCESSLIST, CURRENT QUOTA, ENABLED ROLES, CREATE, DICTIONARIES, QUOTAS, ROW POLICIES, POLICIES, SETTINGS PROFILES, PROFILES, ROLES, USERS (version 20.9.3.45 (official build))\n"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions