Skip to content
Snippets Groups Projects
Unverified Commit 3dfc92a6 authored by Kolya Opahle's avatar Kolya Opahle Committed by GitHub
Browse files

Fix PPA Submission Endpoint Return Type (DEV) (#2366)

parent 1c7c08a1
Branches master
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ import retrofit2.http.POST
interface DataDonationAnalyticsApiV1 {
data class DataDonationAnalyticsResponse(
@SerializedName("errorState") val errorState: String?
@SerializedName("errorCode") val errorCode: String?
)
@POST("/version/v1/android/dat")
......
......@@ -22,7 +22,7 @@ class DataDonationAnalyticsServer @Inject constructor(
return when (code) {
204 -> Timber.d("Analytics upload completed successfully")
400, 401, 403 -> {
val explanation = response.body()?.errorState ?: "Unknown clientside error"
val explanation = response.body()?.errorCode ?: "Unknown clientside error"
throw AnalyticsException(message = explanation).also {
Timber.w(it, "Analytics upload failed with 40X")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment