Skip to content

Commit

Permalink
Merge pull request #763 from sangria-graphql/foreach_for_sideeffect
Browse files Browse the repository at this point in the history
use 'foreach' for side-effects
  • Loading branch information
yanns authored Oct 26, 2021
2 parents 443e7a5 + f6aab7d commit 4edbdf2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ class Resolver[Ctx](
newUc.map(_.ctxFn(v)).getOrElse(userCtx)

def resolveError(newUc: Option[MappedCtxUpdate[Ctx, Any, Any]], e: Throwable) = {
try newUc.map(_.onError(e))
try newUc.foreach(_.onError(e))
catch {
case NonFatal(ee) => ee.printStackTrace()
}
Expand Down

0 comments on commit 4edbdf2

Please sign in to comment.