Day 22. Hashicorp Vault: HTTP Status Codes

Hashicorp Vault: HTTP Status Codes

在使用Vault API 时,回传的HTTP status code跟一般常见的意思有一点点的差异,例如: 429一般是 Too Many Requests, 但在Vault表示Default return code for health status of standby nodes.

HTTP status codes 在Vault有哪些差异呢?可以在官网文件找到说明:
https://www.vaultproject.io/api-docs/index#http-status-codes

.200 - Success with data.

.204 - Success, no data returned.

.400 - Invalid request, missing or invalid data.

.403 - Forbidden, your authentication details are either incorrect, you don't have access to this feature, or - if CORS is enabled - you made a cross-origin request from an origin that is not allowed to make such requests.

.404 - Invalid path. This can both mean that the path truly doesn't exist or that you don't have permission to view a specific path. We use 404 in some cases to avoid state leakage.

.405 - Unsupported operation. You tried to use a method inappropriate to the request path, e.g. a POST on an endpoint that only accepts GETs.

.412 - Precondition failed. Returned on Enterprise when a request can't be processed yet due to some missing eventually consistent data. Should be retried, perhaps with a little backoff. See Vault Eventual Consistency.

.429 - Default return code for health status of standby nodes. This will likely change in the future.

.473 - Default return code for health status of performance standby nodes.
500 - Internal server error. An internal error has occurred, try again later. If the error persists, report a bug.

.502 - A request to Vault required Vault making a request to a third party; the third party responded with an error of some kind.

.503 - Vault is down for maintenance or is currently sealed. Try again later.


<<:  [Day 7]想不到有梗的标题LA(後端篇)

>>:  【DAY 8】SharePoint 的应用五花八门,什麽最适合你?(上)

[Day8] 建立订单交易API_1

这一小节将介绍建立订单交易 首先先分析Request参数,以下是官方范例 虚拟帐号: { "...

Day 24 - Travserable

在介绍 Task Monad 前,来介绍一个重要的概念, 想像一下,有一组阵列里面的项目都是 use...

[Day7] Local File Inclusion / Remote File Inclusion

前言 中场休息过後,来看一下LFI和RFI吧! 正文 LFI LFI全称Local File Inc...

Day 4【HTML + CSS】於是他开始像灵犬莱西一样到处蒐集证据

【前言】 不知道大家有没有看过 Youtube 上面一些 5~12 小时的 Coding 教学影片...

Day 21 - Code Review

前言 进入倒数十天了,这一路走来也是不容易啊((汗 剩下来的十篇,我想要试着把焦点转移,不再是那麽「...