Remora / Remora.Discord

A data-oriented C# Discord library, focused on high-performance concurrency and robust design.
GNU Lesser General Public License v3.0
246 stars 44 forks source link

[Bug]: Dependency Injection error is swallowed when trying to resolve commands and interactions #306

Closed igorquintaes closed 1 year ago

igorquintaes commented 1 year ago

Description

If you forget to add some dependency and a command/interaction needs it, there is none error neither log, it is just swallowed.

Steps to Reproduce

Expected Behavior

Thrown an exception, block request, or even log error in somewhere; What be more appropriate by lib design. Just don't swallow the error.

Current Behavior

Execution finished (like a modal closing after sent) and nothing happens.

Library / Runtime Information

Found in a project using:

Remora.Discord - Latest .NET - 7

Additional info: I spoke with jax and Velvet in Discord support channel about this issue.

Nihlus commented 1 year ago

The latest code should fix this issue. Could you test with the latest development package from the nuget feed?

igorquintaes commented 1 year ago

Just tried with 2023.3.0-github5433142973 version, but it is still swallowing the whole thing. I am going to write a simple repro project

igorquintaes commented 1 year ago

I am very sorry. The issue does not looks related to Remora, but to Scrutor. It happens while we try to decorate some dependency with an unresolved decoration (using same interface). I am going to seek help there to make injection errors like this easy to detect.