return0,0,types.NewErrorWithStatusCode(errors.New("user quota is not enough"),types.ErrorCodeInsufficientUserQuota,http.StatusForbidden,types.ErrOptionWithSkipRetry())
return0,0,types.NewErrorWithStatusCode(errors.New("user quota is not enough"),types.ErrorCodeInsufficientUserQuota,http.StatusForbidden,types.ErrOptionWithSkipRetry(),types.ErrOptionWithNoRecordErrorLog())
}
}
ifuserQuota-preConsumedQuota<0{
ifuserQuota-preConsumedQuota<0{
return0,0,types.NewErrorWithStatusCode(fmt.Errorf("pre-consume quota failed, user quota: %s, need quota: %s",common.FormatQuota(userQuota),common.FormatQuota(preConsumedQuota)),types.ErrorCodeInsufficientUserQuota,http.StatusForbidden,types.ErrOptionWithSkipRetry())
return0,0,types.NewErrorWithStatusCode(fmt.Errorf("pre-consume quota failed, user quota: %s, need quota: %s",common.FormatQuota(userQuota),common.FormatQuota(preConsumedQuota)),types.ErrorCodeInsufficientUserQuota,http.StatusForbidden,types.ErrOptionWithSkipRetry(),types.ErrOptionWithNoRecordErrorLog())