Skip to content

Commit

Permalink
Retry work in case of HTTP code 500
Browse files Browse the repository at this point in the history
I've seen the HTTP code 500 a few times when no connection could be established, so retry in this case.

https://community.openhab.org/t/android-app-item-update-error-http-500-in-case-of-no-connection/149488
Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Oct 8, 2023
1 parent 9e82edc commit 8921f50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class ItemUpdateWorker(context: Context, params: WorkerParameters) : CoroutineWo

companion object {
private val TAG = ItemUpdateWorker::class.java.simpleName
private val RETRY_HTTP_ERROR_CODES = listOf(408, 425, 502, 503, 504)
private val RETRY_HTTP_ERROR_CODES = listOf(408, 425, 500, 502, 503, 504)

private const val INPUT_DATA_ITEM_NAME = "item"
private const val INPUT_DATA_LABEL = "label"
Expand Down

0 comments on commit 8921f50

Please sign in to comment.