Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Propagate error to sender when asking #9

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

PetrosPapapa
Copy link
Owner

fixes suprnation#25

Lets ActorCell$.invoke propagate exceptions to processMailbox and then through the Deferred back to the sender.

The Deferred has to be an Either as a channel for the exception.

Added a unit test for this as well.

Note that an exception in the receiver will now make both the receiver and the sender fail (as opposed to only the receiver).

@PetrosPapapa PetrosPapapa merged commit bb627e0 into main Oct 30, 2024
1 check failed
PetrosPapapa added a commit that referenced this pull request Nov 1, 2024
* fix: Propagate error to sender when asking  (#9)

* fix: Propagate error to sender when asking

fixes suprnation#25

* refactor: Cleanup AskSpec and scalafmt

* refactor: ActorCell$.processMailbox use fold instead of match

* feat: Broadcast & Typecheck (#10)

* Feature: Scheduled timers (#13)

* WIP - Feature: Introduce scheduled timers

* Reorganize, cleanup and add copyright

* Remove ref update from interceptTimerMsg

* Receive msg right away instead of resending

* Scala 3 compat

* Bring back F covariance

* Implement restart and stop unit tests

* Bring back explicit type

* Rework unit tests using TestKit

* Update timers to extend Actor

* Add tracking actor utility method

* Fix type erasure warning

* WIP - Feature: Introduce scheduled timers

* Reorganize, cleanup and add copyright

* Remove ref update from interceptTimerMsg

* Receive msg right away instead of resending

* Scala 3 compat

* Bring back F covariance

* Implement restart and stop unit tests

* Bring back explicit type

* Rework unit tests using TestKit

* Update timers to extend Actor

* Add tracking actor utility method

* Fix type erasure warning

---------

Co-authored-by: jeronimo <jeronimo@suprnation.com>

* feature: Switched to .as instead of .map (+2 squashed commits)
Squashed commits:
[496b4d6] feature: Switched to .map instead of .flatMap
[769c4ea] feature: Fixed issue with deadletter mailbox showing that it's open. Added expectMsgPF and expectTerminated TestKit methods

* feature: Added receiveWhile to the TestKit and refactored the TestKitSpec

* feature: Added the ability to ignore schedules in the waitForIdle helper method.

* style: scalafmt

* fix: Scala 3 does not like the Timer type when matching

* docs: missing headers

---------

Co-authored-by: Jeronimo Carlos <jeronimo.carlos@ing.austral.edu.ar>
Co-authored-by: jeronimo <jeronimo@suprnation.com>
Co-authored-by: Massimo Saliba <massimo@suprnation.com>
@PetrosPapapa PetrosPapapa deleted the bugfix/HandleErrorOnAsk branch November 7, 2024 13:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Deferred of an ask ignores errors
1 participant