Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
In order to be compatible with mysql/mysql2 connectors, connector error have a property error.code that correspond to server error code .
example:
SqlError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1 |
sql: wrong query - parameters:[]
|
at Object.module.exports.createError (C:\temp\mariadb-connector-.
|
...
|
sql: 'wrong query - parameters:[]', |
fatal: false, |
errno: 1064, |
sqlState: '42000', |
code: 'ER_PARSE_ERROR' |
}
|
This code, 'ER_PARSE_ERROR' in example has then be used to compare error in different framework.
Connector error code list must be update to recent MariaDB 10.9 error code (actually use 10.6 error code list)