Validate MS return
tanneberger opened this issue · comments
Describe the bug
Function register_service does not validate if the return value from an other microservice is valid see this
To Reproduce
e.g just send an invalid device_uuid and it will crash.
Expected behavior , Solution
Something like this
temp: dict = m.contact_microservice("device", ["hardware", "register"], {**r_data, **config["services"][name]["needs"], "user": user})
if "error" in temp:
return temp
given_per: Tuple[float, float, float, float, float] = game_content.dict2tuple(temp)