fix(http): log when getSuperProps fails

This commit is contained in:
ayn2op 2025-12-21 18:17:04 -05:00
parent 1c7237566b
commit 6972ac6cb2
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,7 @@
package http
import (
"log/slog"
stdHttp "net/http"
)
@ -20,7 +21,10 @@ func Headers() stdHttp.Header {
headers.Set("X-Debug-Options", "bugReporterEnabled")
headers.Set("X-Discord-Locale", string(Locale))
if superProps, err := superProps(); err == nil {
superProps, err := getSuperProps()
if err != nil {
slog.Error("failed to get super props", "err", err)
} else {
headers.Set("X-Super-Properties", superProps)
}

View file

@ -52,7 +52,7 @@ func IdentifyProperties() gateway.IdentifyProperties {
}
}
func superProps() (string, error) {
func getSuperProps() (string, error) {
props := IdentifyProperties()
delete(props, "is_fast_connect")
delete(props, "gateway_connect_reasons")