From 28f32cd19833963b93570a229612fe0e1d672f13 Mon Sep 17 00:00:00 2001 From: Antonio Date: Sat, 1 Jul 2023 14:36:18 +0800 Subject: [PATCH] bump captcha handling --- captcha.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/captcha.go b/captcha.go index 05b5bf5..a41ef88 100644 --- a/captcha.go +++ b/captcha.go @@ -20,12 +20,12 @@ func captchaStart(c *gin.Context) { } session, err := funcaptcha.StartChallenge(token, hex) if err != nil { - c.JSON(500, gin.H{"error": err.Error()}) + c.JSON(500, gin.H{"error": "unable to log requests"}) return } err = session.RequestChallenge(false) if err != nil { - c.JSON(500, gin.H{"error": err.Error()}) + c.JSON(500, gin.H{"error": "failed to request challenge"}) return } // Get form data (check if download_images is true) @@ -35,7 +35,7 @@ func captchaStart(c *gin.Context) { // Get Base64 encoded image images, err = funcaptcha.DownloadChallenge(session.ConciseChallenge.URLs, true) if err != nil { - c.JSON(500, gin.H{"error": err.Error()}) + c.JSON(500, gin.H{"error": "failed to download images"}) return } }