Skip to content

Commit cc4cb6c

Browse files
committed
Set up error classes for bad requests and unprocessable entities
1 parent c071aec commit cc4cb6c

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

src/neuralaudio/errors/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from .bad_request_error import BadRequestError
4+
from .unprocessable_entity_error import UnprocessableEntityError
5+
6+
__all__ = ["BadRequestError", "UnprocessableEntityError"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ..core.api_error import ApiError
4+
import typing
5+
6+
7+
class BadRequestError(ApiError):
8+
def __init__(self, body: typing.Optional[typing.Any]):
9+
super().__init__(status_code=400, body=body)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ..core.api_error import ApiError
4+
from ..types.http_validation_error import HttpValidationError
5+
6+
7+
class UnprocessableEntityError(ApiError):
8+
def __init__(self, body: HttpValidationError):
9+
super().__init__(status_code=422, body=body)

0 commit comments

Comments
 (0)