Skip to content

Commit

Permalink
feat(helpers.error_handler): create error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeeraa committed Dec 12, 2024
1 parent 89b927d commit 07ec1be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helpers/error_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Contains error handler(s)"""

from instances.log import logger
from arc import GatewayContext


async def send_error(e: Exception, ctx: GatewayContext, cmd: str) -> None:
logger.error(f"Error in {cmd} command: {e}")
await ctx.respond("An error occurred while processing your request.")

0 comments on commit 07ec1be

Please sign in to comment.