Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix: fix a bug with agent config when user not exist #4034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Sep 19, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

避免遇到报错:

cause]: error: insert or update on table "agents" violates foreign key constraint "agents_user_id_users_id_fk"
      at s.parseErrorMessage (/var/task/.next/server/chunks/59261.js:9:15071)
      at s.handlePacket (/var/task/.next/server/chunks/59261.js:9:11729)
      at s.parse (/var/task/.next/server/chunks/59261.js:9:10380)
      at e.<anonymous> (/var/task/.next/server/chunks/59261.js:9:15761)
      at e.emit (/var/task/.next/server/chunks/59261.js:4:6578)
      at WebSocket.<anonymous> (/var/task/.next/server/chunks/59261.js:6:5132)
      at WebSocket.onMessage (/var/task/node_modules/next/dist/compiled/ws/index.js:1:3420)
      at WebSocket.emit (node:events:519:28)
      at Receiver.receiverOnMessage (/var/task/node_modules/next/dist/compiled/ws/index.js:1:43736)
      at Receiver.emit (node:events:519:28) {
    length: 291,
    severity: 'ERROR',
    code: '23503',
    detail: 'Key (user_id)=(user_2mHfNHno7AyCL2MT50ruQIBG9dJ) is not present in table "users".',
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: 'public',
    table: 'agents',
    column: undefined,
    dataType: undefined,
    constraint: 'agents_user_id_users_id_fk',
    file: 'ri_triggers.c',
    line: '2608',
    routine: 'ri_ReportViolation'
  }

📝 补充信息 | Additional Information

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 19, 2024
Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 7:26pm
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 7:26pm

@lobehubbot
Copy link
Member

👍 @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.73%. Comparing base (08c53eb) to head (e55a3df).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4034   +/-   ##
=======================================
  Coverage   91.73%   91.73%           
=======================================
  Files         481      481           
  Lines       34195    34195           
  Branches     2085     2085           
=======================================
  Hits        31368    31368           
  Misses       2827     2827           
Flag Coverage Δ
app 91.73% <ø> (ø)
server 97.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants