diff --git a/controller/relay.go b/controller/relay.go index 0f7792efd9..a678888d93 100644 --- a/controller/relay.go +++ b/controller/relay.go @@ -117,7 +117,7 @@ func Relay(c *gin.Context, relayFormat types.RelayFormat) { if common.IsRequestBodyTooLargeError(err) || errors.Is(err, common.ErrRequestBodyTooLarge) { newAPIError = types.NewErrorWithStatusCode(err, types.ErrorCodeReadRequestBodyFailed, http.StatusRequestEntityTooLarge, types.ErrOptionWithSkipRetry()) } else { - newAPIError = types.NewError(err, types.ErrorCodeInvalidRequest) + newAPIError = types.NewError(err, types.ErrorCodeInvalidRequest, types.ErrOptionWithStatusCode(http.StatusBadRequest), types.ErrOptionWithSkipRetry()) } return }