Skip to content

Commit 6b0ea08

Browse files
committed
Updated error message when a required table was not found in the database
1 parent 28b70e0 commit 6b0ea08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ ZongJi.prototype._fetchTableInfo = function (tableMapEvent, next) {
132132
if (rows.length === 0) {
133133
this.emit(
134134
'error',
135-
new Error('Insufficient permissions to access: ' + tableMapEvent.schemaName + '.' + tableMapEvent.tableName)
135+
new Error(
136+
`Insufficient permissions to access [${tableMapEvent.schemaName}.${tableMapEvent.tableName}], or the table has been dropped.`
137+
)
136138
);
137139
// This is a fatal error, no additional binlog events will be
138140
// processed since next() will never be called
@@ -249,7 +251,7 @@ ZongJi.prototype.start = function (options = {}) {
249251
event.updateColumnInfo();
250252
} catch (error) {
251253
const schemaError = new Error(
252-
`Event received for table <${event.tableName}> that does not match the current schema.`,
254+
`Event received for table [${event.schemaName}.${event.tableName}] that does not match its current schema.`,
253255
{
254256
cause: error
255257
}

0 commit comments

Comments
 (0)