-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerHog data often sends JSON with missing disk type #907
Comments
This is weird as this should have been fixed. Disk is not needed and should be ignored. |
I can see that you tried to introduce some optional validation here: edf3c6e But still you are setting the Pydantic object as the main validator for the route: async def hog_add(measurements: List[HogMeasurement]): So to my understanding instead of making some checks optional you add some checks on top. I think the validate_measurement_data() can be simplified as many checks can be moved to the Pydantic object. |
I implemented a second validator as it seemed cleaner than describing the whole object in pydantic which I find quite confusing for this case. But I get the argument that we should use one system.
|
The JSON sent from PowerHog is expected to have a
disk
key. However sometimes it is missing.Example error:
@ribalba I sent you the JSON separately via email because it contains sensitive content.
For now I excluded this error from triggering. Unsure if that is a viable solution. See commit here: a4c29aa
The text was updated successfully, but these errors were encountered: