From c40c0e58dec381051537df78918535f498c3dea8 Mon Sep 17 00:00:00 2001 From: Jarkko Jaakola Date: Wed, 18 Dec 2024 15:27:11 +0200 Subject: [PATCH] fix: schema error codes need to be JSON serializable [EC-680] --- src/schema_registry/routers/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schema_registry/routers/errors.py b/src/schema_registry/routers/errors.py index 18c80299d..6acae4247 100644 --- a/src/schema_registry/routers/errors.py +++ b/src/schema_registry/routers/errors.py @@ -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