influxdata / influxdata/influxdb

/orgs/{orgID}/members POST - with non-object string for request returns HTTP 500

Open
#24,000 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.

Against the API

1. Prepare a request for the endpoint `/orgs/{orgID}/members` POST method, where the request is any non-json string value e.g. "FOO"
2. Send the request

__Expected behavior:__
Expected that the server would report back that the request body could not be unmarshalled and an HTTP status of 400.

__Actual behavior:__
Server returns HTTP 500.

__Environment info:__
Testing against K8S-IDPE remocal

latest commit

```
commit f0b03edd5301c300ca61b5faf8ce363e94d65c32 (HEAD -> master, origin/master, origin/HEAD)
Author: Phil Bracikowski <13472206+philjb@users.noreply.github.com>
Date: Tue Dec 20 17:31:45 2022 -0800

```

Contributor guide

Open the contributing guide

Research direction

Reproduce the POST request to `/orgs/{orgID}/members` with a non-JSON string such as "FOO" and trace how the request body is handled. The fix is done when malformed bodies return an HTTP 400 with an unmarshalling error instead of HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
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.