1
0
Commit Graph

15 Commits

Author SHA1 Message Date
Hamid Ghaf
e55c18ed12
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00
Nick Cabatoff
192baa88db
Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
hghaf099
6a8e377b72
VAULT-1303 when a request to vault fails, show namespace if set (#12196)
* VAULT-1303 when a request to vault fails, show namespace if set

* Adding changelog

* Fix Changelog file name

* Set namespace in ResponseWriter headers if it is set

* Using consts.NamespaceHeaderName instead of the literal string
2021-07-30 12:32:05 -04:00
Nick Cabatoff
4348c13611
Revert #12061 due to failures in TestLogical_RequestSizeLimit (#12093) 2021-07-15 12:55:09 -04:00
hghaf099
3a92d774db
Add namespace in error (#12061)
* hghaf099-VAULT-1303-Adding namespace in error when it is set

* casting ResponseWriter in handleMonitor to logical.NamespaceResponseWriter

* Casting ResponseWriter conditionally for http.Flusher
Adding changelog

* Improving changlog message
2021-07-14 15:55:55 -04:00
Vishal Nayak
c68e270863
Resource Quotas: Rate Limiting (#9330) 2020-06-26 17:13:16 -04:00
Alex Dadgar
cc3a81801f
API Response returns specialized error type (#6984)
* Return specialized error type

* Add a helper for extracting gRPC codes from errors

* Fix spacing in example

* Drop grpc codes

* Fix storing of decoded errors
2019-06-26 11:35:08 -07:00
Jeff Mitchell
170521481d
Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
Jeff Mitchell
19e5061779
Allow returning warnings and other data in 404s in the Go API (#4256)
* Allow returning list information and other data in 404s.

On read it'll output data and/or warnings on a 404 if they exist. On
list, the same behavior; the actual 'vault list' command doesn't change
behavior though in terms of output unless there are no actual keys (so
it doesn't just magically show other data).

This corrects some assumptions in response_util and wrapping.go; it also
corrects a few places in the latter where it could leak a (useless)
token in some error cases.

* Use same 404 logic in delete/put too

* Add the same secret parsing logic to the KV request functions
2018-04-03 22:35:45 -04:00
Vishal Nayak
13790538b6 api: Don't treat 429 as error (#2850)
* api: Don't treat 429 as error

* Added parenthesis
2017-06-12 18:31:36 -04:00
vishalnayak
ef97199360 Added JSON Decode and Encode helpers.
Changed all the occurances of Unmarshal to use the helpers.
Fixed http/ package tests.
2016-07-06 12:25:40 -04:00
Jeff Mitchell
b44d2c01c0 Use UseNumber() on json.Decoder to have numbers be json.Number objects
instead of float64. This fixes some display bugs.
2016-04-20 18:38:20 +00:00
Mitchell Hashimoto
fe4fe231f8 http: fix mount endpoints 2015-03-16 10:51:13 -07:00
Mitchell Hashimoto
ca13e2501e api: Response can decode errors 2015-03-11 17:46:41 -05:00
Mitchell Hashimoto
f0c804e42a api: sys methods 2015-03-11 17:46:41 -05:00