Properly propagate exceptions in SQSClient (#99)
diff --git a/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala b/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
index 04bfb09..1d9bb97 100644
--- a/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
+++ b/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
@@ -220,11 +220,12 @@
.standard()
.withClientConfiguration(new ClientConfiguration().withMaxConnections(maxConnections))
.withCredentials(instanceProfileCredentialsProvider)
+ .withRegion(region)
.build()
}
} catch {
case e: Exception =>
- throw new SparkException(s"Error occured while creating Amazon SQS Client ${e.getMessage}")
+ throw new SparkException(s"Error occured while creating Amazon SQS Client", e)
}
}