fix(consts): return default identify properties if response status code is not OK

This commit is contained in:
ayn2op 2025-09-18 15:23:55 -04:00
parent 2608f1d57b
commit b3f9a2f6fa

View file

@ -71,6 +71,10 @@ func GetIdentifyProps() gateway.IdentifyProperties {
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return defaultIdentifyProps
}
var props Properties
if err := json.NewDecoder(resp.Body).Decode(&props); err != nil {
return defaultIdentifyProps