added an exception msg handler in pagination data
This commit is contained in:
parent
f167092510
commit
2c83430988
14
src/utils.py
14
src/utils.py
@ -192,7 +192,19 @@ class PaginationView(View):
|
||||
"""
|
||||
|
||||
embed = self.embed.copy()
|
||||
data, total_results = await self.getdata(self.index)
|
||||
|
||||
try:
|
||||
data, total_results = await self.getdata(self.index)
|
||||
except aiohttp.ClientResponseError as exc:
|
||||
log.error(exc)
|
||||
await (
|
||||
Followup(f"Error · {exc.message}",)
|
||||
.footer(f"HTTP {exc.code}")
|
||||
.error()
|
||||
.send(self.inter)
|
||||
)
|
||||
raise exc
|
||||
|
||||
self.maxpage = self.calc_total_pages(total_results, self.pagesize)
|
||||
|
||||
for i, item in enumerate(data):
|
||||
|
Loading…
x
Reference in New Issue
Block a user