Skip to content

Commit

Permalink
feat(database/online): fix dynamodb delete table error
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghancc committed Jan 26, 2022
1 parent d87acfa commit 9b5edff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/database/online/dynamodb/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dynamodb

import (
"context"
"errors"

"github.com/oom-ai/oomstore/internal/database/dbutil"

Expand Down Expand Up @@ -30,7 +31,9 @@ func (db *DB) Import(ctx context.Context, opt online.ImportOpt) error {
TableName: aws.String(tableName),
})
if err != nil {
return errdefs.WithStack(err)
if apiErr := new(types.ResourceNotFoundException); !errors.As(err, &apiErr) {
return errdefs.WithStack(err)
}
}
}
// Step 1: create table
Expand Down

0 comments on commit 9b5edff

Please sign in to comment.