Skip to content

[DI] DI fails to throw an exception when DI tried to create an actor with missing constructor parameter #5734

@Arkatufus

Description

@Arkatufus

Version Information
Version of Akka.NET? 1.4.35
Which Akka.NET Modules? Akka.DependencyInjection

Describe the bug
Originally posted in stackoverflow
DI fails to throw an exception when DI tried to create an actor with missing constructor parameter. ie. the constructor parameter was not provided both in the props parameter and does not exist in the service provider.

To Reproduce
Steps to reproduce the behavior:
Reproduction spec: #5735

Expected behavior
ActorSystem.ActorOf() should throw when DI failed to instantiate the actor class

Actual behavior
ActorSystem.ActorOf() returned an IActorRef with a null actor inside its ActorCell

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions