Improve error logs
This commit is contained in:
parent
7dae5107f8
commit
bf0ef17e23
|
@ -166,7 +166,7 @@ export const pack = (
|
|||
|
||||
// (データベースの欠損などで)ファイルがデータベース上に見つからなかったとき
|
||||
if (_file == null) {
|
||||
console.warn(`in packaging driveFile: driveFile not found on database: ${_file}`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: driveFile :: ${file}`);
|
||||
return resolve(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ export const pack = (
|
|||
|
||||
// (データベースの不具合などで)投稿が見つからなかったら
|
||||
if (_favorite.note == null) {
|
||||
console.warn(`in packaging favorite: note not found on database: ${_favorite.noteId}`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: favorite -> note :: ${_favorite.id} (note ${_favorite.noteId})`);
|
||||
return resolve(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -281,9 +281,9 @@ export const pack = async (
|
|||
_note = deepcopy(note);
|
||||
}
|
||||
|
||||
// 投稿がデータベース上に見つからなかったとき
|
||||
// (データベースの欠損などで)投稿がデータベース上に見つからなかったとき
|
||||
if (_note == null) {
|
||||
console.warn(`note not found on database: ${note}`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: note :: ${note}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -382,17 +382,17 @@ export const pack = async (
|
|||
|
||||
//#region (データベースの欠損などで)参照しているデータがデータベース上に見つからなかったとき
|
||||
if (_note.user == null) {
|
||||
console.warn(`[DAMAGED DB] (missing) in pkg note -> user :: ${_note.id} (user ${_note.userId})`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: note -> user :: ${_note.id} (user ${_note.userId})`);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_note.replyId != null && _note.reply == null) {
|
||||
console.warn(`[DAMAGED DB] (missing) in pkg note -> reply :: ${_note.id} (reply ${_note.replyId})`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_note.renoteId != null && _note.renote == null) {
|
||||
console.warn(`[DAMAGED DB] (missing) in pkg note -> renote :: ${_note.id} (renote ${_note.renoteId})`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`);
|
||||
return null;
|
||||
}
|
||||
//#endregion
|
||||
|
|
|
@ -132,7 +132,7 @@ export const pack = (notification: any) => new Promise<any>(async (resolve, reje
|
|||
|
||||
// (データベースの不具合などで)投稿が見つからなかったら
|
||||
if (_notification.note == null) {
|
||||
console.warn(`in packaging notification: note not found on database: ${_notification.noteId}`);
|
||||
console.warn(`[DAMAGED DB] (missing) pkg: notification -> note :: ${_notification.id} (note ${_notification.noteId})`);
|
||||
return resolve(null);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue