Skip to content

Commit

Permalink
fix: schema error codes need to be JSON serializable
Browse files Browse the repository at this point in the history
[EC-680]
  • Loading branch information
jjaakola-aiven committed Dec 18, 2024
1 parent 7969dc8 commit c40c0e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schema_registry/routers/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
See LICENSE for details
"""

from enum import Enum, unique
from enum import Enum, IntEnum, unique
from fastapi import HTTPException, status
from fastapi.exceptions import RequestValidationError


@unique
class SchemaErrorCodes(Enum):
class SchemaErrorCodes(IntEnum):
HTTP_BAD_REQUEST = status.HTTP_400_BAD_REQUEST
HTTP_NOT_FOUND = status.HTTP_404_NOT_FOUND
HTTP_CONFLICT = status.HTTP_409_CONFLICT
Expand Down

0 comments on commit c40c0e5

Please sign in to comment.