OperationalError [UsageError]: Invalid new record.
Details:
Could not use specified `createdBy`. Expecting an id representing the associated record, or `null` to indicate there will be no associated record. But the specified value is not a valid `createdBy`. Instead of a number (the expected pk type), got: {
createdAt: 1625624508516,
updatedAt: 1625624508516,
id: 53,
name: 'Peter Quinn',
email: '[email protected]',
avatar: 'https://randomuser.me/api/portraits/men/32.jpg',
location: 'Langley',
bio: 'Rather not say'
}
at Object.module.exports.bootstrap (C:\Users\fangc\Dev\chat-app\new-chat-app\config\bootstrap.js:27:36) {
cause: Error [UsageError]: Invalid new record.
Details:
Could not use specified `createdBy`. Expecting an id representing the associated record, or `null` to indicate there will be no associated record. But the specified value is not a valid `createdBy`. Instead of a number (the expected pk type), got: {
createdAt: 1625624508516,
updatedAt: 1625624508516,
id: 53,
name: 'Peter Quinn',
email: '[email protected]',
avatar: 'https://randomuser.me/api/portraits/men/32.jpg',
location: 'Langley',
bio: 'Rather not say'
}
at Object.module.exports.bootstrap (C:\Users\fangc\Dev\chat-app\new-chat-app\config\bootstrap.js:27:36) {
code: 'E_INVALID_NEW_RECORD',
details: 'Could not use specified `createdBy`. Expecting an id representing the associated record, or `null` to indicate there will be no associated record. But the specified value is not a valid `createdBy`. Instead of a number (the expected pk type), got: {\n' +
' createdAt: 1625624508516,\n' +
' updatedAt: 1625624508516,\n' +
' id: 53,\n' +
" name: 'Peter Quinn',\n" +
" email: '[email protected]',\n" +
" avatar: 'https://randomuser.me/api/portraits/men/32.jpg',\n" +
" location: 'Langley',\n" +
" bio: 'Rather not say'\n" +
'}'
},
isOperational: true,
code: 'E_INVALID_NEW_RECORD',
details: 'Could not use specified `createdBy`. Expecting an id representing the associated record, or `null` to indicate there will be no associated record. But the specified value is not a valid `createdBy`. Instead of a number (the expected pk type), got: {\n' +
' createdAt: 1625624508516,\n' +
' updatedAt: 1625624508516,\n' +
' id: 53,\n' +
" name: 'Peter Quinn',\n" +
" email: '[email protected]',\n" +
" avatar: 'https://randomuser.me/api/portraits/men/32.jpg',\n" +
" location: 'Langley',\n" +
" bio: 'Rather not say'\n" +
'}'
}