Skip to content

Commit

Permalink
Add guard
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Mar 28, 2022
1 parent ff38df2 commit 6423028
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/FSharp.AWS.DynamoDB/TableContext.fs
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,10 @@ type TableContext<'TRecord> internal
match mode with
| InitializationMode.VerifyOnly | InitializationMode.CreateIfNotExists _ -> ()
| InitializationMode.CreateOrUpdateThroughput t ->
// TODO make this not throw when its a null update
do! __.UpdateProvisionedThroughputAsync(t)
let provisioned = td.Table.ProvisionedThroughput
if t.ReadCapacityUnits <> provisioned.ReadCapacityUnits
|| t.WriteCapacityUnits <> provisioned.WriteCapacityUnits then
do! __.UpdateProvisionedThroughputAsync(t)

| Choice2Of2 (:? ResourceNotFoundException) when mode <> InitializationMode.VerifyOnly ->
let throughput =
Expand Down

0 comments on commit 6423028

Please sign in to comment.