SAKE: Log error on CreateRecord

This commit is contained in:
Palapeli 2026-04-01 15:05:04 -04:00
parent e4bc072e57
commit d14fd2e737
No known key found for this signature in database
GPG Key ID: 1FFE8F556A474925

View File

@ -276,6 +276,7 @@ func createRecord(moduleName string, profileId uint32, gameInfo common.GameInfo,
if gameInfo.Name == "mariokartwii" && (request.TableID == "GhostData" || request.TableID == "StoredGhostData") {
// Reserved for special handler
logging.Error(moduleName, "Attempt to create record in reserved table", aurora.Cyan(request.TableID))
return StorageResponseBody{CreateRecordResponse: &StorageCreateRecordResponse{
CreateRecordResult: ResultTableNotFound,
}}
@ -298,6 +299,7 @@ func createRecord(moduleName string, profileId uint32, gameInfo common.GameInfo,
// TODO: Limit number of records or fields a user can have
recordId, err := database.InsertSakeRecord(pool, ctx, record)
if err != nil {
logging.Error(moduleName, "Failed to insert sake record into the database:", err)
return StorageResponseBody{CreateRecordResponse: &StorageCreateRecordResponse{
CreateRecordResult: ResultDatabaseUnavailable,
}}