Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

fix(base): resolve the correct key on insertion error #64

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

henrycunh
Copy link
Contributor

@henrycunh henrycunh commented Apr 4, 2023

what

When an item was created with the key inside the creation payload, upon insertion conflict the error message would show undefined.

await base.insert({ key: 'foo' })
await base.insert({ key: 'foo' }) // Error: Item with key undefined already exists

Now it resolves the correct key for the error message

await base.insert({ key: 'foo' })
await base.insert({ key: 'foo' }) // Error: Item with key foo already exists

@abdelhai
Copy link
Contributor

@brkp could you please review and eventually merge.

@nullptropy nullptropy merged commit ee30765 into deta:main Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants