diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-11 02:19:21 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-11 02:19:21 +0900 |
| commit | bf0ef17e23454fc18ef759b9bacdb1c00ac1e89c (patch) | |
| tree | 6738343c1a61f32aea9d6c51f218ae57b54e0305 /src/models/note.ts | |
| parent | Improve fault tolerance (diff) | |
| download | sharkey-bf0ef17e23454fc18ef759b9bacdb1c00ac1e89c.tar.gz sharkey-bf0ef17e23454fc18ef759b9bacdb1c00ac1e89c.tar.bz2 sharkey-bf0ef17e23454fc18ef759b9bacdb1c00ac1e89c.zip | |
Improve error logs
Diffstat (limited to 'src/models/note.ts')
| -rw-r--r-- | src/models/note.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/models/note.ts b/src/models/note.ts index a27c92c572..5687151d80 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -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 |