Skip to content

Commit eccf10e

Browse files
committed
docs: expand err.code description
1 parent 1634ea0 commit eccf10e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,9 +1155,10 @@ review carefully in order to write solid applications.
11551155
Most errors created by this module are instances of the JavaScript [Error][]
11561156
object. Additionally they typically come with two extra properties:
11571157

1158-
* `err.code`: Either a [MySQL server error][] (e.g.
1159-
`'ER_ACCESS_DENIED_ERROR'`), a Node.js error (e.g. `'ECONNREFUSED'`) or an
1160-
internal error (e.g. `'PROTOCOL_CONNECTION_LOST'`).
1158+
* `err.code`: String, contains the MySQL server error symbol if the error is
1159+
a [MySQL server error][] (e.g. `'ER_ACCESS_DENIED_ERROR'`), a Node.js error
1160+
code if it is a Node.js error (e.g. `'ECONNREFUSED'`), or an internal error
1161+
code (e.g. `'PROTOCOL_CONNECTION_LOST'`).
11611162
* `err.fatal`: Boolean, indicating if this error is terminal to the connection
11621163
object. If the error is not from a MySQL protocol operation, this property
11631164
will not be defined.

0 commit comments

Comments
 (0)