diff options
author | Zach Smith <zach@driver.xyz> | 2018-08-30 13:06:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 13:06:32 -0700 |
commit | 8f6fac2a324c1ec2e134d144e7ef39260355b1b6 (patch) | |
tree | 9f4bb436ba0f63d39b311aead31ddef0f46bde83 /src | |
parent | e3172cac98dfef4abc189bd2a8f2f74fb5caaaba (diff) | |
download | driver-core-8f6fac2a324c1ec2e134d144e7ef39260355b1b6.tar.gz driver-core-8f6fac2a324c1ec2e134d144e7ef39260355b1b6.tar.bz2 driver-core-8f6fac2a324c1ec2e134d144e7ef39260355b1b6.zip |
Swap Left and Right cases in GCP Pubsub createSubscription handler (#207)v1.13.2
Diffstat (limited to 'src')
-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 _ => () } } |