tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 466 forks source link

Niggle : The exception raised following a request.cancel() operation is misspelt. AFAIK the correct spelling is Cancelled, not Canceled #1591

Closed markddrake closed 9 months ago

markddrake commented 9 months ago

There is a typo in multiple places when an exeception is raised following a call to request.cancel(). The correct spelling is cancelled. The Exception that is returned is as follows:

RequestError: Canceled.
        at /usr/src/YADAMU/node_modules/mssql/lib/tedious/request.js:449:19
        at Array.forEach (<anonymous>)
        at Request.userCallback (/usr/src/YADAMU/node_modules/mssql/lib/tedious/request.js:446:46)
        at Request.callback (/usr/src/YADAMU/node_modules/tedious/lib/request.js:239:14)
        at /usr/src/YADAMU/node_modules/tedious/lib/connection.js:2664:24
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
      code: 'ECANCEL',
      originalError: RequestError: Canceled.
          at /usr/src/YADAMU/node_modules/tedious/lib/connection.js:2664:33
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
        code: 'ECANCEL'
      },
      number: 'ECANCEL',
      lineNumber: undefined,
      state: undefined,
      class: undefined,
      serverName: undefined,
      procName: undefined,
      precedingErrors: []
    }

Expected behaviour:

Actual behaviour:

Configuration:

// paste relevant config here

Software versions

Very minor, except that I was searching logs for the correct spelling...

dhensby commented 9 months ago

I don't disagree, "cancelled" is much more common in the UK, but both spellings are acceptable and a single "l" is favoured in the US.

This spelling of "canceled" has been used since the feature was added 9.5 years ago in v0.5.1, so I think we've lived with it long enough to keep it that way.