Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperKluka committed Jan 23, 2023
1 parent 3bda583 commit 2073683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/com/ably/tracking/common/AblyHelpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ private fun TokenAuthException.toAblyException(): AblyException =
* Fatal errors have status codes like 4xx (e.g. 400).
*/
fun ConnectionException.isFatal(): Boolean {
return (400 .. 499).contains(errorInformation.statusCode)
return (400..499).contains(errorInformation.statusCode)
}

/**
* Indicates whether the exception from Ably is retriable and we can attempt to retry it.
* Non-fatal errors have status codes in range 500-504.
*/
fun ConnectionException.isRetriable(): Boolean {
return (500 .. 504).contains(errorInformation.statusCode)
return (500..504).contains(errorInformation.statusCode)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConnectionExceptionTests(
private val isRetriable: Boolean,
) {

companion object{
companion object {
@JvmStatic
@Parameterized.Parameters(
name = "Status code: {0} | Is fatal: {1} | Is retriable: {2}"
Expand Down

0 comments on commit 2073683

Please sign in to comment.