hashicorp / hashicorp/consul

Trying to aquire a lock on a key/value pair with a non existent session id returns a 500

Open
#1,139 3 comments 1 reaction 0 assignees View on GitHub
theme/api type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

When I call PUT /v1/kv/whateverkey?acquire= I get a 500 with "Invalid session"

This seems more like a 404 me or probably a 400 since the key doesn't need to exist. I think it would be great if this behaviour would be documented on https://www.consul.io/docs/agent/http/kv.html.

Best,

Dirk

Contributor guide

Open the contributing guide

Research direction

Start by reproducing PUT /v1/kv/whateverkey?acquire= and trace the Consul HTTP KV endpoint handling for the invalid session response. Check the KV API documentation at consul.io/docs/agent/http/kv.html. Done means the endpoint returns an appropriate client error instead of 500 and documents the behavior.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.