I encountered this while looking at MiguelAngelLV/ha-nintendo-switch#10; the following lines do a print and then return None;
|
if res.status_code != 200: |
|
print(f'Unexpected HTTP code "{res.status_code} {res.reason}" from imink f') |
|
return None |
|
if res.status_code != 200: |
|
print(f'Unexpected HTTP code "{res.status_code} {res.reason}" from imink config') |
|
return None |
These should be using logging or the likes, with an error or a warning, since then it can bubble up to other applications, such as home assistant.