Skip to content

Commit

Permalink
Avoid SQL error log (#120)
Browse files Browse the repository at this point in the history
Signed-off-by: nojaf <florian.verdonck@outlook.com>
Co-authored-by: Software Developer <7852635+dsuhinin@users.noreply.github.com>
  • Loading branch information
nojaf and dsuhinin authored Jan 23, 2025
1 parent 00af4c0 commit 72b9167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func NewDatabase(ctx context.Context, storeURL string) (*gorm.DB, error) {

database, err := gorm.Open(dialector, &gorm.Config{
TranslateError: true,
Logger: NewLoggerAdaptor(logger, LoggerAdaptorConfig{}),
Logger: NewLoggerAdaptor(logger, LoggerAdaptorConfig{IgnoreRecordNotFoundError: true}),
})
if err != nil {
return nil, fmt.Errorf("failed to connect to database %q: %w", uri.String(), err)
Expand Down

0 comments on commit 72b9167

Please sign in to comment.