MODiX icon indicating copy to clipboard operation
MODiX copied to clipboard

StackExchangeModule does not valid exchange token for null

Open 333fred opened this issue 5 years ago • 4 comments

If the token is null, it's silently used. It will then cause a WebException in the StackExchangeService when the query fails due to lack of token.

333fred avatar Jan 01 '20 19:01 333fred

Little confused, I can't see the exception, though MODiX comes back with a more or less empty embed. image

patrickklaeren avatar Jan 08 '20 22:01 patrickklaeren

@Inzanit but I'm assuming you also didn't get any logs about said empty token?

333fred avatar Jan 08 '20 23:01 333fred

I would guess something else in the module will catch the exception and format as an empty message?

333fred avatar Jan 08 '20 23:01 333fred

Logging it at warning level would probably be good enough UX for developers. I didn't see any exception being raised, even with all exceptions turned on - maybe I'm missing something, I assume you just ran the command, nothing special?

Beyond logging, we could also return an actual error message in the Discord chat to inform users that there is no valid key.

patrickklaeren avatar Jan 09 '20 11:01 patrickklaeren

As part of a new effort to refocus on priorities, I will close this. If you feel this is imperative to the bot, a new issue can be opened to supersede this.

patrickklaeren avatar Mar 26 '24 14:03 patrickklaeren