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

Check for record not found when searching the store #1686

Merged
merged 3 commits into from
Mar 10, 2024

Conversation

mlsmaycon
Copy link
Collaborator

Describe your changes

This change returns status.NotFound only on gorm.ErrRecordNotFound and status.Internal on every other DB error

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

This change returns status.NotFound only on gorm.ErrRecordNotFound

and status.Internal on every other DB error
@mlsmaycon mlsmaycon merged commit 5dde044 into main Mar 10, 2024
16 checks passed
@mlsmaycon mlsmaycon deleted the fix/check-for-record-not-found branch March 10, 2024 18:09
Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
This change returns status.NotFound only on gorm.ErrRecordNotFound and status.Internal on every other DB error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants