fix(http): log when getSuperProps fails
This commit is contained in:
parent
1c7237566b
commit
6972ac6cb2
2 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue