Skip to content

Add support for latex rendering server >400 errors#1278

Merged
Xithrius merged 9 commits into
python-discord:mainfrom
MedAliMarz:handle_latex_server_errors
Jun 6, 2023
Merged

Add support for latex rendering server >400 errors#1278
Xithrius merged 9 commits into
python-discord:mainfrom
MedAliMarz:handle_latex_server_errors

Conversation

@MedAliMarz
Copy link
Copy Markdown
Contributor

Relevant Issues & Changes

Closes #1146

I've added a catch for ClientResponseError, raised a LatexServerError and handled the later to return a user message, with a tiny refactoring of the code that creates the embed (in case of error)

Did you:

Comment thread bot/exts/fun/latex.py
Comment thread bot/exts/fun/latex.py Outdated
@MedAliMarz MedAliMarz requested a review from shtlrs May 25, 2023 17:17
Comment thread bot/exts/fun/latex.py Outdated
Comment thread bot/exts/fun/latex.py Outdated
Comment thread bot/exts/fun/latex.py Outdated
@MedAliMarz MedAliMarz requested a review from shtlrs May 27, 2023 18:06
Copy link
Copy Markdown
Contributor

@shtlrs shtlrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great ! Just one last comment.

Comment thread bot/exts/fun/latex.py Outdated
@MedAliMarz MedAliMarz requested a review from shtlrs May 27, 2023 18:14
Copy link
Copy Markdown
Contributor

@shtlrs shtlrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you !

Copy link
Copy Markdown
Contributor

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well. Thanks for the PR!

@Xithrius Xithrius enabled auto-merge (squash) June 6, 2023 06:53
@Xithrius Xithrius merged commit de2eab4 into python-discord:main Jun 6, 2023
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.

Handle Latex API Errors

3 participants