aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/rest/errors/serviceException.scala
diff options
context:
space:
mode:
authorzachdriver <zach@driver.xyz>2018-05-25 12:44:15 -0700
committerGitHub <noreply@github.com>2018-05-25 12:44:15 -0700
commitd61ed25db4d71ac182f09ce7bc02439470f3a998 (patch)
treebdc0089e60ac7cf84e850e2024acd5ddbcdbaaa0 /src/main/scala/xyz/driver/core/rest/errors/serviceException.scala
parent57cd7aaf5a2154af698fddc39f4bff8fd3e4f6e7 (diff)
downloaddriver-core-d61ed25db4d71ac182f09ce7bc02439470f3a998.tar.gz
driver-core-d61ed25db4d71ac182f09ce7bc02439470f3a998.tar.bz2
driver-core-d61ed25db4d71ac182f09ce7bc02439470f3a998.zip
Add service exception json formatters and pass through exceptions in HttpRestServiceTransport (#168)v1.9.4
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest/errors/serviceException.scala')
-rw-r--r--src/main/scala/xyz/driver/core/rest/errors/serviceException.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/errors/serviceException.scala b/src/main/scala/xyz/driver/core/rest/errors/serviceException.scala
index 095936e..db289de 100644
--- a/src/main/scala/xyz/driver/core/rest/errors/serviceException.scala
+++ b/src/main/scala/xyz/driver/core/rest/errors/serviceException.scala
@@ -10,7 +10,10 @@ final case class InvalidActionException(override val message: String = "This act
final case class ResourceNotFoundException(override val message: String = "Resource not found")
extends ServiceException(message)
-final case class ExternalServiceException(serviceName: String, serviceMessage: String)
+final case class ExternalServiceException(
+ serviceName: String,
+ serviceMessage: String,
+ serviceException: Option[ServiceException])
extends ServiceException(s"Error while calling '$serviceName': $serviceMessage")
final case class ExternalServiceTimeoutException(serviceName: String)