Skip to content

Commit

Permalink
fix: check invalid status by its code
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Apr 8, 2022
1 parent be238b8 commit 284aa9a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -53,7 +53,7 @@ class CosmosSourceTask : SourceTask() {
.takeWhile { !serviceClient.isClosed() }
.map { serviceClient.getBlockByHeight(it) }
.map { it.getOrThrow() }
.catch { if (it is StatusException && it.status != Status.INVALID_ARGUMENT) throw it }
.catch { if (it is StatusException && it.status.code != Status.INVALID_ARGUMENT.code) throw it }
.map { asSourceRecord(it) }
.toList()
}
Expand Down

0 comments on commit 284aa9a

Please sign in to comment.