Skip to content

Commit

Permalink
OkHttpMethodBase: prevent NPE when logging exception
Browse files Browse the repository at this point in the history
ex.message may be null

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
  • Loading branch information
AlvaroBrey committed Oct 28, 2022
1 parent f5d3dc3 commit a33586c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ abstract class OkHttpMethodBase(
try {
response = client.client.newCall(request).execute()
} catch (ex: IOException) {
Log_OC.e(this, ex.message, ex)
Log_OC.e(this, "Error executing method", ex)
}

return response?.code ?: UNKNOWN_STATUS_CODE
Expand Down

0 comments on commit a33586c

Please sign in to comment.