Skip to content

Commit

Permalink
fix(adam): handle missing --multi-package option
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Oct 12, 2022
1 parent e3d9512 commit 63edb86
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ class CreateMultiPackageSessionRequest(
override suspend fun readElement(socket: Socket): String {
val createSessionResponse = socket.readStatus()
if (!createSessionResponse.contains("Success")) {
throw RequestRejectedException("Failed to create multi-package session")
throw RequestRejectedException("Failed to create multi-package session, cause: $createSessionResponse")
}

val sessionId = createSessionResponse.substringAfter('[', "").substringBefore(']', "")
if (sessionId.isEmpty()) {
throw RequestRejectedException("Failed to create multi-package session")
throw RequestRejectedException("Failed to create multi-package session, cause: $createSessionResponse")
}

return sessionId
Expand Down

0 comments on commit 63edb86

Please sign in to comment.