influxdata / influxdata/kapacitor
/write endpoint inconsistent content-type under error condition
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
test case:
when POSTing the invalid line protocol to the `/write?db=test` endpoint:
```
ha ha ha
```
Expected result:
content-type: text/plain
```
unable to parse 'ha ha ha': invalid field format
```
OR
content-type: application/json
```
{
"error:" "unable to parse 'ha ha ha': invalid field format"
}
```
Actual result (bug):
content-type: application/json
```
unable to parse 'ha ha ha': invalid field format
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the invalid POST to the `/write?db=test` endpoint with `ha ha ha`, then trace the error response handling for that endpoint. Done means the response uses a consistent content type and matching body format, either plain text or the specified JSON structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100