Loading...
Loading...
Compare original and translation side by side
coderabbit-install-authcoderabbit-install-authimport { CodeRabbitClient } from '@coderabbit/sdk';
const client = new CodeRabbitClient({
apiKey: process.env.CODERABBIT_API_KEY,
});import { CodeRabbitClient } from '@coderabbit/sdk';
const client = new CodeRabbitClient({
apiKey: process.env.CODERABBIT_API_KEY,
});async function main() {
// Your first API call here
}
main().catch(console.error);async function main() {
// Your first API call here
}
main().catch(console.error);Success! Your CodeRabbit connection is working.Success! Your CodeRabbit connection is working.| Error | Cause | Solution |
|---|---|---|
| Import Error | SDK not installed | Verify with |
| Auth Error | Invalid credentials | Check environment variable is set |
| Timeout | Network issues | Increase timeout or check connectivity |
| Rate Limit | Too many requests | Wait and retry with exponential backoff |
| 错误类型 | 原因 | 解决方案 |
|---|---|---|
| 导入错误 | SDK未安装 | 使用 |
| 认证错误 | 凭证无效 | 检查环境变量是否已设置 |
| 超时错误 | 网络问题 | 增加超时时间或检查网络连接 |
| 速率限制错误 | 请求过多 | 等待后重试,使用指数退避策略 |
import { CodeRabbitClient } from '@coderabbit/sdk';
const client = new CodeRabbitClient({
apiKey: process.env.CODERABBIT_API_KEY,
});
async function main() {
// Your first API call here
}
main().catch(console.error);import { CodeRabbitClient } from '@coderabbit/sdk';
const client = new CodeRabbitClient({
apiKey: process.env.CODERABBIT_API_KEY,
});
async function main() {
// Your first API call here
}
main().catch(console.error);from coderabbit import CodeRabbitClient
client = CodeRabbitClient()from coderabbit import CodeRabbitClient
client = CodeRabbitClient()undefinedundefinedcoderabbit-local-dev-loopcoderabbit-local-dev-loop