Skip to content

Commit

Permalink
fix: errors after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Nov 1, 2024
1 parent 8a8fcd6 commit 574a762
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions common/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions server/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions server/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
},
}
Expand Down

0 comments on commit 574a762

Please sign in to comment.