influxdata / influxdata/influxdb

Telegrafs - POST or PUT without request body leads to HTTP 500 internal server error

Open
#23,932 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. send a POST request to the `/telegrafs` endpoint or a PUT request to a `/telegrafs/{telegrafID}` endpoint but forget the request body data.

__Expected behavior:__
expected the fact that no request body data was sent to be detected and the issue handled gracefully with an HTTP 400 response and a message indicating the lack of data.

__Actual behavior:__
Server throws HTTP 500 internal server error.

__Environment info:__
testing against K8S_IDPE remocal

latest commit
```
commit b013fc31b31fabaf34e62b615ffaa0ebc088d3e2 (HEAD -> master, origin/master, origin/HEAD)
Author: influx-acs[bot] <107396960+influx-acs[bot]@users.noreply.github.com>
Date: Fri Nov 18 21:38:07 2022 +0000
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the missing-body POST request to `/telegrafs` and the missing-body PUT request to `/telegrafs/{telegrafID}` first. Locate the handlers for these endpoints and trace how an absent body is handled; done means both requests return HTTP 400 with a message indicating that request data is missing instead of HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.