Skip to content

Commit

Permalink
Fix error on bad encoded id
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Nov 19, 2021
1 parent 1c9fc1d commit c57e8f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/http/services/archiver/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import (
"github.com/gdexlab/go-render/render"
ua "github.com/mileusna/useragent"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)

Expand Down Expand Up @@ -284,7 +283,7 @@ func (s *svc) Unprotected() []string {
func decodeResourceID(encodedID string) (string, string, error) {
decodedID, err := base64.URLEncoding.DecodeString(encodedID)
if err != nil {
return "", "", errors.Wrap(err, "resource ID does not follow the required format")
return "", "", errtypes.BadRequest("resource ID does not follow the required format")
}

parts := strings.Split(string(decodedID), ":")
Expand Down

0 comments on commit c57e8f3

Please sign in to comment.