mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[Errors] Add request body in error reporting.
This commit is contained in:
parent
bfbc0861df
commit
2e0c6fa6a5
@ -72,7 +72,7 @@ class ApiError(val tag: String, var errorCode: Int) {
|
||||
|
||||
fun toReportableError(context: Context): ErrorReportRequest.Error {
|
||||
val requestString = request?.let {
|
||||
it.method() + " " + it.url() + "\n" + it.headers()
|
||||
it.method() + " " + it.url() + "\n" + it.headers() + "\n\n" + (it.jsonBody()?.toString() ?: "") + (it.textBody() ?: "")
|
||||
}
|
||||
val responseString = response?.let {
|
||||
if (it.parserErrorBody == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user