How to handle WS.url with Exceptions.
Bottom Line:
WS.url("http://localhost/doesNotExist")
.get()
.map(_ => Some("ok"))
.recover{case _ => None}
Written by nem
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#