diff options
Diffstat (limited to 'src/main/scala/xyz/driver/core/messaging/GoogleBus.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/messaging/GoogleBus.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/scala/xyz/driver/core/messaging/GoogleBus.scala b/src/main/scala/xyz/driver/core/messaging/GoogleBus.scala index 9ee5c07..cf60e59 100644 --- a/src/main/scala/xyz/driver/core/messaging/GoogleBus.scala +++ b/src/main/scala/xyz/driver/core/messaging/GoogleBus.scala @@ -133,9 +133,9 @@ class GoogleBus( .bearer(await(getToken())) val result = await(request.send()) result.body match { - case Right(error) if result.code != 409 => // 409 <=> topic already exists - throw new NoSuchElementException(s"Error creating topic: Status code ${result.code}: ${error}") - case Left(_) => () + case Left(error) if result.code != 409 => // 409 <=> topic already exists + throw new NoSuchElementException(s"Error creating topic: Status code ${result.code}: $error") + case _ => () } } @@ -152,9 +152,9 @@ class GoogleBus( ) val result = await(request.send()) result.body match { - case Right(error) if result.code != 409 => // 409 <=> subscription already exists - throw new NoSuchElementException(s"Error creating subscription: Status code ${result.code}: ${error}") - case Left(_) => () + case Left(error) if result.code != 409 => // 409 <=> subscription already exists + throw new NoSuchElementException(s"Error creating subscription: Status code ${result.code}: $error") + case _ => () } } |