Skip to content

Conversation

@adamgauthier
Copy link
Contributor

Description

Currently in MessageComponentConverter, the error on unknown type is System.ArgumentNullException: Value cannot be null. (Parameter 'target')

This is because PopulateObject() doesn't allow a null target, but we don't have a default case on the switch statement.

Changes

Add a default case with a better exception when this situation happens.

Currently in MessageComponentConverter, the error on unknown type is
System.ArgumentNullException: Value cannot be null. (Parameter 'target')

This is because PopulateObject() doesn't allow a null target, but we
don't have a default case on the switch statement.
@Misha-133 Misha-133 merged commit ae6e7d5 into discord-net:dev Aug 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants