mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-13 19:55:21 +00:00
Add error page for ratelimit
This commit is contained in:
@@ -22,9 +22,11 @@ func HandleEmbed(c *fiber.Ctx) error {
|
||||
default:
|
||||
post, err = api.FetchMedia(c.Params("postID"))
|
||||
}
|
||||
if err != nil && err.Error() == "ratelimited by imgur" {
|
||||
return c.Status(429).Render("errors/429", nil)
|
||||
}
|
||||
if post.Id == "" || (err != nil && strings.Contains(err.Error(), "404")) {
|
||||
c.Status(404)
|
||||
return c.Render("errors/404", nil)
|
||||
return c.Status(404).Render("errors/404", nil)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user