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 duplicate key value violates unique constraint "slug_user_id_unique" when create inbox session #4596

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Nov 3, 2024

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ‘ท build
  • โšก๏ธ perf
  • ๐Ÿ“ docs
  • ๐Ÿ”จ chore

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

ไฟฎๆญฃๆŸไบ›ๆƒ…ๅ†ตไธ‹ไผšๅ‡บ็Žฐ็š„ ๆŠ›้”™๏ผš

error: duplicate key value violates unique constraint "slug_user_id_unique"
    at s.parseErrorMessage (/var/task/.next/server/chunks/34327.js:9:15130)
    ... 8 lines matching cause stack trace ...
    at Receiver.emit (node:events:519:28) {
  code: 'INTERNAL_SERVER_ERROR',
  name: 'TRPCError',
  [cause]: error: duplicate key value violates unique constraint "slug_user_id_unique"
      at s.parseErrorMessage (/var/task/.next/server/chunks/34327.js:9:15130)
      at s.handlePacket (/var/task/.next/server/chunks/34327.js:9:11788)
      at s.parse (/var/task/.next/server/chunks/34327.js:9:10439)
      at e.<anonymous> (/var/task/.next/server/chunks/34327.js:9:15820)
      at e.emit (/var/task/.next/server/chunks/34327.js:4:6578)
      at WebSocket.<anonymous> (/var/task/.next/server/chunks/34327.js:6:5092)
      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: 250,
    severity: 'ERROR',
    code: '23505',
    detail: 'Key (slug, user_id)=(inbox, user_xxxxxxx) already exists.',
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: 'public',
    table: 'sessions',
    column: undefined,
    dataType: undefined,
    constraint: 'slug_user_id_unique',
    file: 'nbtinsert.c',
    line: '666',
    routine: '_bt_check_unique'
  }
}

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Updated (UTC)
lobe-chat-preview โœ… Ready (Inspect) Visit Preview Nov 3, 2024 10:52am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ๐Ÿ› Bug Something isn't working | ็ผบ้™ท labels Nov 3, 2024
@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.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

Copy link

codecov bot commented Nov 3, 2024

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 92.69%. Comparing base (ee31f1d) to head (95fa1d5).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #4596     +/-   ##
=========================================
  Coverage   92.69%   92.69%             
=========================================
  Files         507      507             
  Lines       36450    36455      +5     
  Branches     2222     3355   +1133     
=========================================
+ Hits        33786    33791      +5     
  Misses       2664     2664             
Flag Coverage ฮ”
app 92.69% <100.00%> (+<0.01%) โฌ†๏ธ
server 97.34% <100.00%> (+<0.01%) โฌ†๏ธ

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.

@arvinxx arvinxx merged commit c5af96e into main Nov 3, 2024
12 checks passed
@arvinxx arvinxx deleted the fix/fix-duplicate-create-inbox branch November 3, 2024 12:40
@lobehubbot
Copy link
Member

โค๏ธ Great PR @arvinxx โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Nov 3, 2024
### [Version&nbsp;1.26.19](v1.26.18...v1.26.19)
<sup>Released on **2024-11-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Fix duplicate key value violates unique constraint "slug_user_id_unique" when create inbox session.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix duplicate key value violates unique constraint "slug_user_id_unique" when create inbox session, closes [#4596](#4596) ([c5af96e](c5af96e))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 1.26.19 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Nov 3, 2024
### [Version&nbsp;1.69.10](v1.69.9...v1.69.10)
<sup>Released on **2024-11-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Fix duplicate key value violates unique constraint "slug_user_id_unique" when create inbox session, Fix MS Entra ID and Azure AD authorization.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix duplicate key value violates unique constraint "slug_user_id_unique" when create inbox session, closes [lobehub#4596](https://github.com/bentwnghk/lobe-chat/issues/4596) ([c5af96e](c5af96e))
* **misc**: Fix MS Entra ID and Azure AD authorization, closes [lobehub#4579](https://github.com/bentwnghk/lobe-chat/issues/4579) ([ced8a08](ced8a08))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ› Bug Something isn't working | ็ผบ้™ท released 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