mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 04:05:14 +00:00
Errors in image format (closes #165)
This commit is contained in:
@@ -23,10 +23,10 @@ func HandleEmbed(c *fiber.Ctx) error {
|
||||
post, err = ApiClient.FetchMedia(c.Params("postID"))
|
||||
}
|
||||
if err != nil && err.Error() == "ratelimited by imgur" {
|
||||
return c.Status(429).Render("errors/429", nil)
|
||||
return utils.RenderError(c, 429)
|
||||
}
|
||||
if err != nil && post.Id == "" && strings.Contains(err.Error(), "404") {
|
||||
return c.Status(404).Render("errors/404", nil)
|
||||
return utils.RenderError(c, 404)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user