Don't log ErrNoRows in savedata

pull/5/head
maru 2024-05-09 14:26:54 -04:00
parent e4de7c2391
commit fadd10602a
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@
package api
import (
"database/sql"
"encoding/json"
"fmt"
"net/http"
@ -280,6 +281,10 @@ func handleSaveData(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case "/savedata/get":
save, err = savedata.Get(uuid, datatype, slot)
if err == sql.ErrNoRows {
http.Error(w, err.Error(), http.StatusNotFound)
return
}
case "/savedata/update":
err = savedata.Update(uuid, slot, save)
case "/savedata/delete":