From 574a7628c53d2a14935dca5ee2ec3cf93b8b33d7 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Fri, 1 Nov 2024 22:20:46 +0000 Subject: [PATCH] fix: errors after rebase --- common/store.go | 3 +-- server/errors.go | 4 ++-- server/handlers_test.go | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/store.go b/common/store.go index 62e4660f..2d508538 100644 --- a/common/store.go +++ b/common/store.go @@ -19,8 +19,7 @@ const ( ) var ( - ErrProxyOversizedBlob = fmt.Errorf("encoded blob is larger than max blob size") - ErrEigenDAOversizedBlob = fmt.Errorf("blob size cannot exceed") + ErrProxyOversizedBlob = fmt.Errorf("encoded blob is larger than max blob size") ) func (b BackendType) String() string { diff --git a/server/errors.go b/server/errors.go index a3435497..cba6e10e 100644 --- a/server/errors.go +++ b/server/errors.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/Layr-Labs/eigenda-proxy/commitments" - "github.com/Layr-Labs/eigenda-proxy/store" + "github.com/Layr-Labs/eigenda-proxy/common" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -35,7 +35,7 @@ func is400(err error) bool { // IFFT'ing or encoding the blob, so we shouldn't return a 400 to the client. // See https://github.com/Layr-Labs/eigenda/blob/bee55ed9207f16153c3fd8ebf73c219e68685def/api/errors.go#L22 // for the 400s returned by the disperser server (currently only INVALID_ARGUMENT). - return errors.Is(err, store.ErrProxyOversizedBlob) + return errors.Is(err, common.ErrProxyOversizedBlob) } func is429(err error) bool { diff --git a/server/handlers_test.go b/server/handlers_test.go index 42f985ee..97958826 100644 --- a/server/handlers_test.go +++ b/server/handlers_test.go @@ -12,9 +12,9 @@ import ( "strings" "testing" + "github.com/Layr-Labs/eigenda-proxy/common" "github.com/Layr-Labs/eigenda-proxy/metrics" "github.com/Layr-Labs/eigenda-proxy/mocks" - "github.com/Layr-Labs/eigenda-proxy/store" "github.com/Layr-Labs/eigenda/api" "github.com/ethereum/go-ethereum/log" "github.com/golang/mock/gomock" @@ -237,7 +237,7 @@ func TestHandlerPutErrors(t *testing.T) { { // only 400s are due to oversized blobs right now name: "Failure - BadRequest 400", - mockStorageMgrPutReturnedErr: store.ErrProxyOversizedBlob, + mockStorageMgrPutReturnedErr: common.ErrProxyOversizedBlob, expectedHTTPCode: http.StatusBadRequest, }, }