HTTP status codes
Supabase 平台为每个项目提供了几个 HTTP API。这些 API 可以使用状态码来指示项目的状态以及请求的处理情况。请求返回的状态码可以通过 日志浏览器 访问。
🌐 The Supabase platform offers several HTTP APIs for each project. These APIs can use the status codes to indicate the state of the project, and the request being processed. The status codes returned for requests can be access via the logs explorer.
2XX 成功 #
🌐 2XX success
2XX 状态码表示请求已成功处理。
3XX 重定向 #
🌐 3XX redirects
3XX 状态码表示客户端必须启动另一种操作来成功处理请求。3XX 状态码最常见的用途是将客户端重定向到不同的位置。
4XX 客户端错误 #
🌐 4XX client errors
4XX 状态码表示客户端在发起请求时出现了问题。这可能包括缺少或无效的认证信息、请求格式错误、在短时间内发起了过多请求(“速率限制”),或者客户端本身的网络问题。
402 服务限制 #
🌐 402 service restriction
如果适用合理使用政策,你们组织的项目可能会被限制处理请求。如果施加了服务限制,项目将返回 402 状态码,同时说明项目被限制的原因。说明中可能包含以下一个或多个代码:
🌐 In case the Fair Use Policy is applied, the projects of your organization may be restricted from processing requests. If service restrictions are applied, projects will return a 402 status code together with a description of why the project is restricted. The description can contain one or more of the following codes:
exceeded_*表示该项目持续超出配额使用限制,例如exceed_egress_quota、exceed_db_size_quota。overdue_payment表示该组织有逾期账单。
当公平使用政策生效时,你仍然可以通过 Supabase 仪表板访问你的数据。
🌐 You will still have access to your data through the Supabase dashboard when the Fair Use Policy is applied.
查看合理使用政策部分,了解更多关于限制的信息以及如何取消这些限制。
🌐 See the Fair Use Policy section to learn more about the restrictions and how to remove them.
5XX 服务器或项目错误 #
🌐 5XX server or project errors
5XX 状态码表示项目无法成功处理请求,但这不是因为客户端请求有问题。
5XX 状态码可能是因为项目没有足够的计算来处理客户端发出的复杂请求,或者无法跟上针对项目的请求量导致的。
54X 项目错误 #
🌐 54X project errors
54X 状态码是 Supabase 平台用来表示项目状态的自定义代码。
540 项目暂停 #
🌐 540 project paused
所请求的项目已被暂停。在项目所有者解除暂停之前,项目无法处理请求。
🌐 The project the request was being made against has been paused. The project cannot process requests until it is un-paused by the owner.
免费计划的项目可能会因为不活跃、所有者请求,或者在极少数情况下由于滥用而被暂停。
🌐 Free Plan projects may be paused due to inactivity, on request by the owner, or in rare instances, due to abuse.
544 项目 API 网关超时 #
🌐 544 project API gateway timeout
请求没有在设定的时间内完成。
🌐 The request is not completed within the configured time limit.
超时限制是为了防止长时间运行的查询,这些查询可能导致性能问题、增加延迟,甚至有可能让项目崩溃。
🌐 The timeout limit is set to prevent long-running queries which can cause performance issues, increase latency, and potentially even crash the project.
546 Edge 函数资源限制 #
🌐 546 Edge Functions resource limit
仅适用于 Edge Functions。由于资源限制(WORKER_RESOURCE_LIMIT),函数执行已停止。Edge Function 日志应显示超出了哪个资源限制。
🌐 Applies only to Edge Functions. Function execution was stopped due to a resource limit (WORKER_RESOURCE_LIMIT). Edge Function logs should provide which resource limit was exceeded.