DataBlue: /poll request can return invalid JSON
Open
P2
- Dominant language
- Go
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 6
Description
A request to the datablue /poll endpoint can return invalid JSON in some error conditions.
For example, if the value of a query parameter cannot be parsed as a float value:
```https://data.cloudblue.org/poll?ma=4C:75:25:03:F8:8C&dk=76267409&A0=12a```
This will return the following error:
```{"er":"invalid value"}{"ma":"4C:75:25:03:F8:8C","rc":1,"vs":-617553116}```
Which is not valid JSON.
We should convert datablue to use std library json marshalling for responses to prevent errors like this and make the handlers more readable and configurable.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.