gpt4 book ai didi

如果 auth 服务器超时,则为 Http 状态代码

转载 作者:可可西里 更新时间:2023-11-01 16:46:33 28 4
gpt4 key购买 nike

假设我们正在从我们的服务器启动 oauth 流程,并且提供者超时。我们返回什么作为状态码? 503 表示稍后重试还是 504 表示其他服务器超时?

最佳答案

我认为 502 在这种情况下最合适

502 Bad Gateway

A 502 error means that a website server that is serving as a reverse proxy for the website origin server (for example, a CDN PoP) did not receive a valid response from the origin server. This may be because the origin server is experiencing issues, there is an invalid or incorrect DNS name, or because a firewall on the origin server has blocked the reverse proxy server request.

This may also occur when requests at the origin server are taking several minutes to complete and a caching tool such as Varnish Cache has been instructed to timeout after a set number of seconds. Varnish Cache has a default timeout of 60 seconds, which section.io recommends keeping for security and alerting reasons.

504 Gateway Timeout

Similar to the 502 error, the 504 Gateway Timeout error occurs if the server that is acting as a proxy for the website origin server did not receive a response from the website origin server within a set time period. This may indicate an issue with the DNS host or hosting company, or with the connection or configuration between the reverse proxy servers and the website origin server.

更多信息在这里 https://www.section.io/blog/504-503-errors-difference/

关于如果 auth 服务器超时,则为 Http 状态代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49828261/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com