if data[“success”] != 1:
print(“Request not successfull”)
print(“This is the response->”, data)
is it necessary to write the above lines of code as given as in code explanation part1 of telegram project if we have already written code for exception like:
except Exception as e:
print(“Something went wrong when returning the sensor value”)
because if there is no success then it would always throw an exception and return -999 or am i wrong and there is a case when success !=1 and exception is also not thrown . if yes please tell me about that particular case , if not then what is the significance of writing the code when data[‘success’]!=1 as it will be covered in exception?