Skip to content

Commit

Permalink
Remove use of ErrorWrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
  • Loading branch information
mattt committed Apr 19, 2024
1 parent 6df0fbe commit 4e0e640
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions python/cog/server/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
except ImportError:
from pydantic import ValidationError # pylint: disable=W0404

try:
from pydantic.v1.error_wrappers import ErrorWrapper # type: ignore
except ImportError:
from pydantic.error_wrappers import ErrorWrapper # pylint: disable=W0404

from .. import schema
from ..errors import PredictorNotSet
from ..files import upload_file
Expand Down Expand Up @@ -299,12 +294,8 @@ async def predict_idempotent(
if request.id is not None and request.id != prediction_id:
raise RequestValidationError(
[
ErrorWrapper(
ValueError(
"prediction ID must match the ID supplied in the URL"
),
("body", "id"),
)
ValueError("prediction ID must match the ID supplied in the URL"),
("body", "id"),
]
)

Expand Down

0 comments on commit 4e0e640

Please sign in to comment.