6.3. 获取 Red Hat Quay API 错误详情
使用 API 可发现 Red Hat Quay API 错误详情。
使用以下步骤发现错误详情。
先决条件
- 您已创建了 OAuth 2 访问令牌。
流程
您可以通过输入
GET /api/v1/error/{error_type}
端点来获取 API 的错误详情。请注意,您必须包含以下错误代码之一:HTTP 代码 描述 模式 200
成功调用
400
错误请求
401
需要会话
403
未授权访问
404
未找到
$ curl -X GET "https://<quay-server.example.com>/api/v1/error/<error_type>" \ -H "Authorization: Bearer <access_token>"
输出示例
curl: (7) Failed to connect to quay-server.example.com port 443 after 0 ms: Couldn't connect to server