Skip to content

Commit

Permalink
Fixes WebDAV: Allow 404 for DELETE requests Closes #195
Browse files Browse the repository at this point in the history
Improving httpCode handling across WebDavController.

Upping versionCode to 124
  • Loading branch information
Dima-Android committed Dec 16, 2024
1 parent ca91c26 commit 2c229b2
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 111 deletions.
15 changes: 15 additions & 0 deletions app/src/main/java/org/zotero/android/api/network/CustomResult.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.zotero.android.api.network

import okhttp3.Headers
import org.zotero.android.api.network.CustomResult.GeneralSuccess.NetworkSuccess

sealed class CustomResult<out T> {
sealed class GeneralError : CustomResult<Nothing>() {
Expand Down Expand Up @@ -51,4 +52,18 @@ sealed class CustomResult<out T> {
}
}
}

val resultHttpCode: Int? get() {
return when (this) {
is NetworkSuccess -> {
this.httpCode
}

is GeneralError.NetworkError -> {
this.httpCode
}

else -> null
}
}
}
Loading

0 comments on commit 2c229b2

Please sign in to comment.