@@ -55,12 +55,14 @@ object RestResponse extends RestResponseLowPrio {
5555 }
5656
5757 implicit def taskLikeFromResponseTask [F [_], T ](
58- implicit fromTask : FromTask [F ], fromResponse : AsReal [RestResponse , T ]
58+ implicit fromTask : FromTask [F ],
59+ fromResponse : AsReal [RestResponse , T ],
5960 ): AsReal [Task [RestResponse ], Try [F [T ]]] =
6061 rawTask => Success (fromTask.fromTask(rawTask.map(fromResponse.asReal)))
6162
6263 implicit def taskLikeToResponseTask [F [_], T ](
63- implicit taskLike : TaskLike [F ], asResponse : AsRaw [RestResponse , T ]
64+ implicit taskLike : TaskLike [F ],
65+ asResponse : AsRaw [RestResponse , T ],
6466 ): AsRaw [Task [RestResponse ], Try [F [T ]]] =
6567 _.fold(Task .raiseError, ft => Task .from(ft).map(asResponse.asRaw)).recoverHttpError
6668
@@ -70,13 +72,13 @@ object RestResponse extends RestResponseLowPrio {
7072 @ implicitNotFound(" ${F}[${T}] is not a valid result type because:\n #{forResponseType}" )
7173 implicit def effAsyncAsRealNotFound [F [_], T ](implicit
7274 fromAsync : TaskLike [F ],
73- forResponseType : ImplicitNotFound [AsReal [RestResponse , T ]]
75+ forResponseType : ImplicitNotFound [AsReal [RestResponse , T ]],
7476 ): ImplicitNotFound [AsReal [Task [RestResponse ], Try [F [T ]]]] = ImplicitNotFound ()
7577
7678 @ implicitNotFound(" ${F}[${T}] is not a valid result type because:\n #{forResponseType}" )
7779 implicit def effAsyncAsRawNotFound [F [_], T ](implicit
7880 toAsync : TaskLike [F ],
79- forResponseType : ImplicitNotFound [AsRaw [RestResponse , T ]]
81+ forResponseType : ImplicitNotFound [AsRaw [RestResponse , T ]],
8082 ): ImplicitNotFound [AsRaw [Task [RestResponse ], Try [F [T ]]]] = ImplicitNotFound ()
8183
8284 // following two implicits provide nice error messages when result type of HTTP method is totally wrong
@@ -185,12 +187,14 @@ object StreamedRestResponse extends StreamedRestResponseLowPrio {
185187 }
186188
187189 implicit def taskLikeFromResponseTask [F [_], T ](
188- implicit fromTask : FromTask [F ], fromResponse : AsReal [StreamedRestResponse , T ]
190+ implicit fromTask : FromTask [F ],
191+ fromResponse : AsReal [StreamedRestResponse , T ],
189192 ): AsReal [Task [StreamedRestResponse ], Try [F [T ]]] =
190193 rawTask => Success (fromTask.fromTask(rawTask.map(fromResponse.asReal)))
191194
192195 implicit def taskLikeToResponseTask [F [_], T ](
193- implicit taskLike : TaskLike [F ], asResponse : AsRaw [StreamedRestResponse , T ]
196+ implicit taskLike : TaskLike [F ],
197+ asResponse : AsRaw [StreamedRestResponse , T ],
194198 ): AsRaw [Task [StreamedRestResponse ], Try [F [T ]]] =
195199 _.fold(Task .raiseError, ft => Task .from(ft).map(asResponse.asRaw)).recoverHttpError
196200
@@ -204,8 +208,8 @@ object StreamedRestResponse extends StreamedRestResponseLowPrio {
204208 ): AsRaw [Task [StreamedRestResponse ], Try [Observable [T ]]] =
205209 _.fold(Task .raiseError, ft => Task .eval(ft).map(asResponse.asRaw)).recoverHttpError
206210
207- // following two implicits provide nice error messages when serialization is lacking for HTTP method result
208- // while the async wrapper is fine (e.g. Future)
211+ // following implicits provide nice error messages when serialization is lacking for HTTP method result
212+ // while the async wrapper is fine
209213
210214 @ implicitNotFound(" ${F}[${T}] is not a valid result type because:\n #{forResponseType}" )
211215 implicit def effAsyncAsRealNotFound [F [_], T ](implicit
@@ -219,6 +223,16 @@ object StreamedRestResponse extends StreamedRestResponseLowPrio {
219223 forResponseType : ImplicitNotFound [AsRaw [StreamedRestResponse , T ]]
220224 ): ImplicitNotFound [AsRaw [Task [StreamedRestResponse ], Try [F [T ]]]] = ImplicitNotFound ()
221225
226+ @ implicitNotFound(" Observable[${T}] is not a valid result type because:\n #{forResponseType}" )
227+ implicit def observableAsRealNotFound [T ](implicit
228+ forResponseType : ImplicitNotFound [AsReal [StreamedBody , Observable [T ]]]
229+ ): ImplicitNotFound [AsReal [Task [StreamedRestResponse ], Try [Observable [T ]]]] = ImplicitNotFound ()
230+
231+ @ implicitNotFound(" Observable[${T}] is not a valid result type because:\n #{forResponseType}" )
232+ implicit def observableAsRawNotFound [T ](implicit
233+ forResponseType : ImplicitNotFound [AsRaw [StreamedBody , Observable [T ]]]
234+ ): ImplicitNotFound [AsRaw [Task [StreamedRestResponse ], Try [Observable [T ]]]] = ImplicitNotFound ()
235+
222236 // following two implicits provide nice error messages when result type of HTTP method is totally wrong
223237
224238 @ implicitNotFound(" #{forResponseType}" )
0 commit comments