influxdata / influxdata/kapacitor

/write endpoint inconsistent content-type under error condition

Open
#1,067 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.