Skip to content

Commit 606eb4d

Browse files
committed
remove http code from error message
as it is now part of the class
1 parent 01fecbd commit 606eb4d

File tree

1 file changed

+3
-5
lines changed
  • kotlin-jira-client/kotlin-jira-client-sdk/src/main/kotlin/com/linkedplanet/kotlinjiraclient/sdk/util

1 file changed

+3
-5
lines changed

kotlin-jira-client/kotlin-jira-client-sdk/src/main/kotlin/com/linkedplanet/kotlinjiraclient/sdk/util/EitherExtension.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ fun <T> withErrorCollection(
6060

6161
fun jiraClientError(errorCollection: ErrorCollection, errorTitle: String = "SdkError"): JiraClientError {
6262
val worstReason: ErrorCollection.Reason? = ErrorCollection.Reason.getWorstReason(errorCollection.reasons)
63-
val httpStatusSuffix = worstReason?.let { " (Status Code ${it.httpStatusCode})" } ?: ""
6463
return JiraClientError(
65-
errorTitle,
66-
errorCollection.errorMessages.joinToString(", \n")
67-
+ errorCollection.errors.map { "'${it.key}': ${it.value}" }.joinToString(", \n")
68-
+ httpStatusSuffix,
64+
error = errorTitle,
65+
message = errorCollection.errorMessages.joinToString(", \n")
66+
+ errorCollection.errors.map { "'${it.key}': ${it.value}" }.joinToString(", \n"),
6967
statusCode = worstReason?.httpStatusCode
7068
)
7169
}

0 commit comments

Comments
 (0)