You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are available even without explicit import. I found that this can lead to unintentional retries when forgetting to add your own implicit Success value.
For example, when querying a database I have a result type of Future[Option[???]], where an empty Option stands for a missing value in the database. In some use cases, this is a legitimate return value, and retrying the query won't change anything.
The correct behavior here would be to explicitly have:
implicitvalalways=Success.always
in scope.
But if you forget to add this line, everything still compiles and the option implicit from the Success object is picked up, leading to unwanted retries.
I would suggest removing the implicit modifier from defs above to avoid the unintentional retries.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
Currently the
Success
object provides defaultSuccess
implicits for various standard types:These are available even without explicit import. I found that this can lead to unintentional retries when forgetting to add your own implicit
Success
value.For example, when querying a database I have a result type of
Future[Option[???]]
, where an emptyOption
stands for a missing value in the database. In some use cases, this is a legitimate return value, and retrying the query won't change anything.The correct behavior here would be to explicitly have:
in scope.
But if you forget to add this line, everything still compiles and the
option
implicit from theSuccess
object is picked up, leading to unwanted retries.I would suggest removing the
implicit
modifier fromdef
s above to avoid the unintentional retries.Thanks
The text was updated successfully, but these errors were encountered: