连接授权失败
出现此问题时,API 会返回 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/connection-oauth-failed。所有错误的通用结构,请参阅错误和状态码。
授权已过期:授权流程必须在十分钟内完成。请重新发起连接。
字段#
除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自定义文本。
| 字段 | 类型 |
|---|---|
returnPath | string |
reason | ConnectionOAuthStateExpired | ConnectionOAuthStateUsed | ConnectionOAuthDenied | ConnectionOAuthExchangeFailed | ConnectionOAuthAccountNotGranted | ConnectionOAuthChoiceUnknown | ConnectionNameTaken | ConnectionAlreadyExists | ConnectionAccountMismatch | ConnectionNotAdopted | ConnectionNotFound |
示例#
json
{
"detail": "The authorization expired: it has to finish within ten minutes. Start connecting again.",
"returnPath": "/settings/integrations",
"reason": {
"_tag": "ConnectionOAuthStateExpired"
},
"type": "https://lingo.dev/docs/api/errors/connection-oauth-failed",
"status": 422,
"title": "Connection authorization failed"
}