Skip to content

[Feature Request]: Unified error message and error code #439

@JinHai-CN

Description

@JinHai-CN

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

No unified error message and error code before. For software error, maybe let infinity crash and provide back trace. For recoverable error, we need the error code and error message returned to client.

Describe the feature you'd like

A unified error code and error message to return to client.

Describe implementation you've considered

  1. success
    0000 ok

  2. auth error
    2001 passwd is wrong
    2002 insufficient privilege

  3. syntax error or access rule violation
    3001 invalid username
    3002 invalid password
    3003 invalid db/schema name
    3004 invalid table name
    3005 invalid column name
    3006 invalid index name
    3007 invalid column definition
    3008 invalid table definition
    3009 invalid index definition
    3010 data type mismatch
    3011 name too long
    3012 reserved name
    3013 syntax error
    3014 invalid parameter value
    3015 duplicate user
    3016 duplicate database
    3017 duplicate table
    3018 duplicate index name
    3019 duplicate index
    3020 no such user
    3021 database not exist
    3022 table not exist
    3023 index not exist
    3024 column not exist
    3025 aggregate can't be in where clause
    3026 column name in select list must appear in group by or aggregate function.
    3027 no such system variable
    3028 set invalid value to system variable
    3029 system variable is read-only

  4. txn error
    4001 txn rollback
    4002 txn conflict

  5. insufficient resources or exceed limits
    5001 disk_full
    5002 out of memory
    5003 too many connections
    5004 configuration limit exceed
    5005 query is too complex

  6. operation intervention
    6006 query_canceled
    6007 not supported

  7. system error
    7001 io_error
    7002 duplicated file
    7003 config file error
    7004 lock file exists
    7005 catalog is corrupted
    7006 data corrupted
    7007 index corrupted
    7008 file not found
    7009 dir not found

Documentation, adoption, use case

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions