Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ class ApiClientHelper private constructor(
statusCode = httpResponse.statusCode,
reasonPhrase = httpResponse.reasonPhrase,
code = ecwidError?.errorCode,
message = ecwidError?.errorMessage
message = ecwidError?.errorMessage,
args = ecwidError?.args,
)
} catch (e: JsonDeserializationException) {
throw EcwidApiException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ package com.ecwid.apiclient.v3.dto.common

data class EcwidApiError(
val errorMessage: String? = null,
val errorCode: String? = null
val errorCode: String? = null,
val args: Map<String, String>? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ data class EcwidApiException(
val reasonPhrase: String? = null,
val code: String? = null,
override val message: String? = null,
override val cause: Throwable? = null
val args: Map<String, String>? = null,
override val cause: Throwable? = null,
) : Exception(message, cause)
2 changes: 1 addition & 1 deletion src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fun generateTestOrder(): UpdatedOrder {

shippingOption = UpdatedOrder.ShippingOption(
shippingMethodId = "MethodId " + randomAlphanumeric(8),
shippingCarrierName = "Carrier " + randomAlphanumeric(8),
shippingCarrierName = null, // not saved for pickup, see ECWID-153335
shippingMethodName = "Method " + randomAlphanumeric(8),
shippingRate = randomPrice(),
estimatedTransitTime = "Estimates " + randomAlphanumeric(8),
Expand Down