Skip to content

Commit 132dadd

Browse files
arkamare2b-bot[bot]
authored andcommitted
refactor(shared): remove unused ParseBodyWith
GitOrigin-RevId: 3c8a46f7cc3b730c6fa4c849282423492d862b15
1 parent 8d18e10 commit 132dadd

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

  • packages/shared/pkg/ginutils

‎packages/shared/pkg/ginutils/body.go‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,3 @@ func ParseOptionalBody[B any](ctx context.Context, c *gin.Context) (body B, err
4646

4747
return body, nil
4848
}
49-
50-
func ParseBodyWith[B any](ctx context.Context, c *gin.Context, parse func(io.Reader) (B, error)) (body B, err error) {
51-
body, err = parse(c.Request.Body)
52-
if err != nil {
53-
telemetry.ReportCriticalError(ctx, "error when parsing request", err)
54-
55-
return body, fmt.Errorf("error when parsing request: %w", err)
56-
}
57-
58-
return body, nil
59-
}

0 commit comments

Comments
 (0)