Skip to content

Commit

Permalink
handle-exceed-column-limit amendments 2
Browse files Browse the repository at this point in the history
  • Loading branch information
istreeter committed Apr 2, 2024
1 parent 85e0f07 commit 479e759
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ object TableManager {
def createTable: F[Unit] =
BigQueryRetrying.withRetries(appHealth, retries, monitoring, Alert.FailedToCreateEventsTable(_)) {
underlying.createTable
.recoverWith {
case bqe: BigQueryException if bqe.lowerCaseReason === "duplicate" =>
// Table already exists
Logger[F].info(s"Ignoring error when creating table: ${bqe.getMessage}")
case bqe: BigQueryException if bqe.lowerCaseReason === "accessdenied" =>
Logger[F].info(s"Access denied when trying to create table. Will ignore error and assume table already exists.")
}
}
}

Expand All @@ -112,13 +119,6 @@ object TableManager {
Sync[F]
.blocking(client.create(tableInfo))
.void
.recoverWith {
case bqe: BigQueryException if bqe.lowerCaseReason === "duplicate" =>
// Table already exists
Logger[F].info(s"Ignoring error when creating table: ${bqe.getMessage}")
case bqe: BigQueryException if bqe.lowerCaseReason === "accessdenied" =>
Logger[F].info(s"Access denied when trying to create table. Will ignore error and assume table already exists.")
}
}
}

Expand Down

0 comments on commit 479e759

Please sign in to comment.