diff --git a/api/v1/authenticate/authenticate.go b/api/v1/authenticate/authenticate.go index 36d303e..993eda6 100644 --- a/api/v1/authenticate/authenticate.go +++ b/api/v1/authenticate/authenticate.go @@ -8,7 +8,6 @@ import ( "github.com/NetSepio/erebrus/api/v1/authenticate/challengeid" "github.com/NetSepio/erebrus/util/pkg/auth" "github.com/NetSepio/erebrus/util/pkg/claims" - "github.com/TheLazarusNetwork/go-helpers/httpo" "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" @@ -129,7 +128,11 @@ func authenticate(c *gin.Context) { default: info := "chain name must be between solana, peaq, aptos, sui, eclipse, ethereum" - httpo.NewErrorResponse(http.StatusBadRequest, "Invalid chain name, INFO : "+info).SendD(c) + log.WithFields(log.Fields{ + "err": err, + }).Errorf("Invalid chain name, INFO : %s\n", info) + errResponse := ErrAuthenticate("failed to CheckSignature, error :" + "Invalid chain name, INFO : " + info) + c.JSON(http.StatusInternalServerError, errResponse) return } if isCorrect { diff --git a/go.mod b/go.mod index a5483d6..bbcbe13 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ toolchain go1.22.2 require ( aidanwoods.dev/go-paseto v1.2.0 - github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48 github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e github.com/docker/docker v26.0.1+incompatible github.com/ethereum/go-ethereum v1.10.26 diff --git a/go.sum b/go.sum index af2d10e..8262d9a 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,6 @@ github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25Yn github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc= github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U= -github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48 h1:ih3hzHExA9BKYU2Ta8yxoTj8WDJzd+c9qqCr5OyU99E= -github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48/go.mod h1:mdZW8fVhYr37eUysX2isro+rtUrhxODPh/zTN94VhcQ= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=