Skip to content

Handling of NaN in measurement values #190

Open
@thjean

Description

@thjean

Expected Behavior

When posting a bunch of data in a row and one of these measurement values is NaN, the API should discard this value but should accept the other (valid) measurement values.

Current Behavior

The entire posting is rejected with "HTTP/1.1 422 Unprocessable Entity", including the valid measurement data send. This holds true for any of the data formats (JSON-Array, CSV, Raw).

(My firmware sets the value to NaN if a read error occurs on I2C readings. While this sometimes happens when reading the BME280 data for humidity or pressure, I never observed this with the other I2C sensors)

Possible Solution

Process the valid data and discard just the NaN value.

Steps to Reproduce (for bugs)

Post several values with one of them being set to NaN. Set a value to "nan" for JSON array or csv format or set the value to NaN according to IEEE754 for raw format

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions