Comments (4)
We are catching this further up
try:
with open(image_path, "wb") as out_file:
await self._generate_image(TEMPLATE.substitute(text=query), out_file)
except InvalidLatexError as err:
embed = discord.Embed(title="Failed to render input.")
if err.logs is None:
embed.description = "No logs available."
else:
logs_paste_url = await self._upload_to_pastebin(err.logs)
if logs_paste_url:
embed.description = f"[View Logs]({logs_paste_url})"
else:
embed.description = "Couldn't upload logs."
await ctx.send(embed=embed)
image_path.unlink()
return
We say that we couldn't render the input, which I think is enough to close this.
from sir-lancebot.
Sure, I'll assign you.
As for the error message, what you've suggested or something like '' Server encountered an issue, please retry in a moment '' should do the job.
We can discuss this in the PR at the worst case.
from sir-lancebot.
We're only catching the InvalidLatexError
, which wont be raised in the case of a 5xx exception (since a ClientResponseError
will be raised before the line we raise that error is reached).
Also, I think it's worth distinguishing between errors with a user's input, and error's with the server.
from sir-lancebot.
I would like to work on this issue, yet what would be a good user message in that case ?
I suggest : "Rendering server is unavailable, please try again later"
from sir-lancebot.
Related Issues (20)
- Add pastebin link to .bm command. HOT 1
- Using `imsosorry` for uwuification HOT 1
- AttributeError: 'async_generator' object has no attribute 'filter'
- addition of .hsp command to lancebot HOT 1
- "Christmas tree" holiday reaction reacts to just "tree" HOT 1
- ValidationError: 1 validation error for RfcDocument
- Fix Gitpod support HOT 1
- Randomize colour of hearts for Valentines reactions HOT 1
- Trashcan delete reaction does not work in DMs HOT 3
- New trivia questions HOT 1
- Option to send public valentines privately through DMs HOT 1
- Add more trivia questions HOT 1
- Add random graph trivia questions HOT 1
- Display word on hangman timeout HOT 2
- Fix minesweeper command HOT 1
- Fix reddit command
- Trivia question 423 is wrong HOT 1
- Improve formatting of `.quiz help` HOT 4
- TypeError: can't compare offset-naive and offset-aware datetimes
- latex preamble update part 2: fun with TikZ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sir-lancebot.