~velizar


#126 When a user submits a command which fails with a connection error, react with 🔌 instead of 🚫 3 months ago

Comment by ~velizar on ~nova/fletcher

After looking at the source code, I think that this might not be plausible for the !stylish command, because it's very plausible that the endpoint being called returns 500 instead of 503 or 504, and you don't want to handle 500 with 🔌, you want 🚫 or something, so it also depends on the backend for that command returning the precise status code. But in theory, the fix would be something like this (this should work for the aiohttp library):

except (HTTPServiceUnavailable, HTTPGatewayTimeout) as e:
    exc_type, exc_obj, exc_tb = exc_info()
    logger.error("STF[{}]: {} {}".format(exc_tb.tb_lineno, type(e).__name__, e))
    await message.add_reaction("🔌")```

#126 When a user submits a command which fails with a connection error, react with 🔌 instead of 🚫 3 months ago

Feature Request added by ~velizar on ~nova/fletcher

#126 When a user submits a command which fails with a connection error, react with 🔌 instead of 🚫 3 months ago

Ticket created by ~velizar on ~nova/fletcher

When a user submits a command which fails with any type of connection error, react with 🔌 instead of 🚫, which might make the debugging easier, but more importantly is very cute, so from that standpoint it's a feature request.

Overall I would be a big fan of reacting with various emojis depending on what went wrong (or right, if there are multiple possible ways to succeed for a command).