This commit is contained in:
tsmethurst 2022-02-08 12:19:54 +01:00
parent 3301148bb7
commit b42b0a667e
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
// overwriting the lockfile if we store a file called 'store.lock'.
// However, in this case it's OK because the keys are set by
// GtS and not the user, so we know we're never going to overwrite it.
LockFile: path.Join(storageBasePath, "store.lock"),
LockFile: path.Join(storageBasePath, "store.lock"),
})
if err != nil {
return fmt.Errorf("error creating storage backend: %s", err)

View File

@ -36,7 +36,7 @@ func processSQLiteError(err error) db.Error {
// Handle supplied error code:
switch sqliteErr.Code() {
case sqlite3.SQLITE_CONSTRAINT_UNIQUE, sqlite3.SQLITE_CONSTRAINT_PRIMARYKEY:
return db.NewErrAlreadyExists(err.Error())
return db.NewErrAlreadyExists(err.Error())
default:
return err
}