1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-13 09:26:23 -07:00

Improve error handling during post formatting

This commit is contained in:
Eggbertx 2024-08-26 21:16:03 -07:00
parent 82bf2942c6
commit ec63cf0ac9
7 changed files with 44 additions and 32 deletions

View file

@ -642,8 +642,12 @@ func reparseHTMLCallback(_ http.ResponseWriter, _ *http.Request, _ *gcsql.Staff,
errEv.Err(err).Caller().Msg("Unable to scan SQL row")
return "", err
}
formatted := posting.FormatMessage(messageRaw, boardDir)
gcsql.ExecSQL(updateQuery, formatted, postID)
if formatted, err := posting.FormatMessage(messageRaw, boardDir); err != nil {
errEv.Err(err).Caller().Msg("Unable to format message")
return "", err
} else {
gcsql.ExecSQL(updateQuery, formatted, postID)
}
}
outputStr += "Done reparsing HTML<hr />"