Skip to content

More verbose exceptions #1102

@Naamloos

Description

@Naamloos

Summary

DSharpPlus throws a lot of exceptions if you mess up a lot of stuff, but what really causes it when it does? In a lot of cases you don't really know. My suggestion is to add more error prevention/handling by throw exceptions when the user tries to do stuff they shouldn't.

Details

E.g. #1031 had discussion about embed limits, and not exactly knowing where limits are hit. Instead of getting a 500: bad request dsharpplus should prevent actually sending this data, and possibly explain in the exception what the user did wrong.

There's a lot of cases like this where the library does not properly prevent user errors, causing indescriptive exceptions to be thrown where the user does not really always know what went wrong. The library should tell the user why their request was invalid before actually sending in my opinion because I'm fairly sure discord just tells you "no".

Do tell me if I'm wrong and whether Discord exceptions are actually descriptive and whether I'm dumb

Steps to reproduce

Not applicable

Notes

This issue also serves as a place to collect different instances of the library not properly preventing user errors.

Metadata

Metadata

Assignees

No one assigned

    Effort

    None yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions