Bluesky feed server - NSFW Likes
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Make sure ktor can refresh tokens

+3 -8
+3 -8
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 - 133 131 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 134 132 } 135 133 ··· 152 150 } 153 151 154 152 when (response.status) { 155 - HttpStatusCode.BadRequest, 156 - HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to put record: ${response.bodyAsText()}") 153 + HttpStatusCode.BadRequest -> throw RuntimeException("Failed to put record: ${response.bodyAsText()}") 157 154 } 158 155 } 159 156 ··· 178 175 return Pair(likeRefs, cursor) 179 176 } 180 177 181 - HttpStatusCode.BadRequest, 182 - HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to get likes: ${response.bodyAsText()}") 178 + HttpStatusCode.BadRequest -> throw RuntimeException("Failed to get likes: ${response.bodyAsText()}") 183 179 184 180 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 185 181 } ··· 199 195 return response.posts 200 196 } 201 197 202 - HttpStatusCode.BadRequest, 203 - HttpStatusCode.Unauthorized -> throw RuntimeException("Failed to get posts: ${response.bodyAsText()}") 198 + HttpStatusCode.BadRequest -> throw RuntimeException("Failed to get posts: ${response.bodyAsText()}") 204 199 205 200 else -> throw RuntimeException("Unexpected response received: ${response.bodyAsText()}") 206 201 }