We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe can add some utility to check mysql Error
import * as MysqlErrorCode from 'mysql/lib/protocol/constants/errors'; /** * MysqlErrorCode like { * "163": "HA_ERR_FOREIGN_DUPLICATE_KEY", * "HA_ERR_FOREIGN_DUPLICATE_KEY": 163, * } */ export const isMySQLErrorCode = (code: string) => { return typeof code === 'string' && typeof MysqlErrorCode?.[code] === 'number'; };
class MySQLError extends Error{ }
error.isMySqlError = true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Maybe can add some utility to check mysql Error
The text was updated successfully, but these errors were encountered: