From 60c61abdeb4b86d8ba168bda200aaf88aa7b2986 Mon Sep 17 00:00:00 2001 From: colin-lamed <9568290+colin-lamed@users.noreply.github.com> Date: Thu, 17 Feb 2022 11:10:07 +0000 Subject: [PATCH] BDOG-1512 Move implict ErrorTimeout --- .../main/scala/uk/gov/hmrc/http/HttpErrorFunctions.scala | 7 ++++++- .../src/main/scala/uk/gov/hmrc/http/client/package.scala | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/http-verbs-common/src/main/scala/uk/gov/hmrc/http/HttpErrorFunctions.scala b/http-verbs-common/src/main/scala/uk/gov/hmrc/http/HttpErrorFunctions.scala index 38219502..995d3a05 100644 --- a/http-verbs-common/src/main/scala/uk/gov/hmrc/http/HttpErrorFunctions.scala +++ b/http-verbs-common/src/main/scala/uk/gov/hmrc/http/HttpErrorFunctions.scala @@ -123,5 +123,10 @@ trait HttpErrorFunctions { object HttpErrorFunctions extends HttpErrorFunctions case class ErrorTimeout( - toDuration: Duration = 10.seconds + toDuration: Duration ) extends AnyVal + +object ErrorTimeout { + implicit val errorTimeout: ErrorTimeout = + ErrorTimeout(10.seconds) +} diff --git a/http-verbs-common/src/main/scala/uk/gov/hmrc/http/client/package.scala b/http-verbs-common/src/main/scala/uk/gov/hmrc/http/client/package.scala index 80097ac4..4b12f2ff 100644 --- a/http-verbs-common/src/main/scala/uk/gov/hmrc/http/client/package.scala +++ b/http-verbs-common/src/main/scala/uk/gov/hmrc/http/client/package.scala @@ -36,10 +36,6 @@ package object client } trait StreamHttpReadsInstances { - // default may be overridden if required - implicit val errorTimeout: ErrorTimeout = - ErrorTimeout() - def tag[A](instance: A): A with client.Streaming = instance.asInstanceOf[A with client.Streaming]