Bluesky feed server - NSFW Likes

Back out "fix: Make sure ktor can refresh tokens"

This backs out commit a0c60e805fa3db56ad8fbaca3bdfbedc8d7addc1.

+8 -3
+8 -3
darkfeed/src/main/kotlin/api/BskyApi.kt
··· 128 128 129 129 HttpStatusCode.BadRequest -> if (response.body<ErrorResponse>().error == "RecordNotFound") return null 130 130 131 + HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to get record: ${response.bodyAsText()}") 132 + 131 133 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 132 134 } 133 135 ··· 150 152 } 151 153 152 154 when (response.status) { 153 - HttpStatusCode.BadRequest -> throw RuntimeException("Failed to put record: ${response.bodyAsText()}") 155 + HttpStatusCode.BadRequest, 156 + HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to put record: ${response.bodyAsText()}") 154 157 } 155 158 } 156 159 ··· 175 178 return Pair(likeRefs, cursor) 176 179 } 177 180 178 - HttpStatusCode.BadRequest -> throw RuntimeException("Failed to get likes: ${response.bodyAsText()}") 181 + HttpStatusCode.BadRequest, 182 + HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to get likes: ${response.bodyAsText()}") 179 183 180 184 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 181 185 } ··· 195 199 return response.posts 196 200 } 197 201 198 - HttpStatusCode.BadRequest -> throw RuntimeException("Failed to get posts: ${response.bodyAsText()}") 202 + HttpStatusCode.BadRequest, 203 + HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to get posts: ${response.bodyAsText()}") 199 204 200 205 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 201 206 }