错误处理
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
以下是您在使用 Alert Center API 时可能会收到的错误代码,以及有关如何解读这些错误代码的说明和在收到这些错误代码时应采取的措施。了解详情。
错误代码 |
说明 |
操作 |
400:错误请求 |
如果输入请求中存在错误,系统会返回此错误代码。 |
请检查请求,对请求进行必要的更改,然后重试。 |
401:凭据无效 |
访问令牌无效或已过期。 |
刷新访问令牌,然后重试。 |
404 |
未找到指定的资源。如果请求的提醒不存在,系统会抛出此异常。 |
|
409 |
指定的资源已存在。 |
获取资源,并根据需要执行更新。 |
500 |
处理请求时发生意外错误。 |
使用指数退避算法重试。 |
503 |
超出速率限制。 |
使用指数退避算法重试。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-25。
[null,null,["最后更新时间 (UTC):2025-03-25。"],[],[],null,["# Error Handling\n\nThe following are the error codes you might get when using Alert Center API\nalong with explanation on how to interpret them and guidance on what to do when\nyou get them. [Learn more](/workspace/admin/alertcenter/support).\n\n| **Error code** | **Description** | **Action** |\n|------------------------------|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| **400: Bad Request** | This error code is returned when there is an error in the input request. | Check the request, make required changes to the request, and try again. |\n| **401: Invalid Credentials** | The access token is invalid or expired. | Refresh the access token and try again. |\n| **404** | The specified resource was not found. This would be thrown when the requested alert does not exist. | |\n| **409** | The specified resource already exists. | Get the resource, and if needed perform an update. |\n| **500** | An unexpected error happened while processing the request. | Retry with [exponential backoff](https://developers.google.com/api-client-library/java/google-http-java-client/backoff). |\n| **503** | Rate limit exceeded. | Retry with [exponential backoff](https://developers.google.com/api-client-library/java/google-http-java-client/backoff). |"]]