Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-165

Adding initial message error value on Error object.

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.5.4, 3.0.0-beta
    • other
    • None

    Description

      Driver throw SqlError object defined like this :

      export interface SqlError extends Error {
        /**
         * Either a MySQL server error (e.g. 'ER_ACCESS_DENIED_ERROR'),
         * a node.js error (e.g. 'ECONNREFUSED') or an internal error
         * (e.g. 'PROTOCOL_CONNECTION_LOST').
         */
        code: string | null;
       
        /**
         * The error number for the error code
         */
        errno: number;
       
        /**
         * The sql state
         */
        sqlState?: string | null;
       
        /**
         * Boolean, indicating if this error is terminal to the connection object.
         */
        fatal: boolean;
      }
      

      extending Error with message value.
      Problem is that message as additional value added :
      example 'My error label' => message will be `(conn=5149, no: 1644, SQLState: 45000) My error label` + sql + stack

      This consist to adding 2 properties : initial message error and sql.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.