influxdata / influxdata/influxdb

/dashboards/{dashboardID}/owners - POST adding user as owner a second time causes HTTP 500

Open
#23,955 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.

Over the REST API

1. create a dashboard
2. prepare a request to `/dashboards/{dashboardID}/owners` but in the requestBody add the ID of the user who created the dashboard
3. send the request

__Expected behavior:__
As I've seen with other resources, expected an HTTP response of 422 or something similar, because the user can be an owner only once.

__Actual behavior:__
Server returns HTTP 500 internal server error

__Environment info:__

Testing against K8S-IDPE remocal. Latest commit.

```
commit 36edfae0f1409f79490e31e43846c9e258329e2c (HEAD -> master, origin/master, origin/HEAD)
Author: Cannon Palms
Date: Mon Nov 28 21:23:47 2022 -0500

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the POST /dashboards/{dashboardID}/owners request with the dashboard creator's user ID, then trace the REST API entry point that handles dashboard ownership. Confirm that adding an existing owner returns a client error such as HTTP 422 instead of HTTP 500; the payload does not name a source file or test.

Written by the indexing model from the issue text.

Assessment

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