Skip to content

Commit e11911d

Browse files
committed
fix: use shared error responses on calibration endpoints
1 parent 8f40fab commit e11911d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/mavedb/routers/score_calibrations.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
from mavedb.models.score_calibration import ScoreCalibration
3232
from mavedb.models.score_calibration_functional_classification import ScoreCalibrationFunctionalClassification
3333
from mavedb.models.score_set import ScoreSet
34+
from mavedb.routers.shared import ACCESS_CONTROL_ERROR_RESPONSES, PUBLIC_ERROR_RESPONSES
3435
from mavedb.view_models import score_calibration
3536

3637
logger = logging.getLogger(__name__)
3738

3839
router = APIRouter(
3940
prefix="/api/v1/score-calibrations",
4041
tags=["Score Calibrations"],
41-
responses={404: {"description": "Not found"}},
42+
responses={**PUBLIC_ERROR_RESPONSES},
4243
route_class=LoggedRoute,
4344
)
4445

@@ -58,7 +59,7 @@
5859
"/me",
5960
status_code=200,
6061
response_model=list[score_calibration.ScoreCalibrationWithScoreSetUrn],
61-
responses={401: {}, 403: {}},
62+
responses={**ACCESS_CONTROL_ERROR_RESPONSES},
6263
summary="List my calibrations",
6364
)
6465
def list_my_calibrations(

0 commit comments

Comments
 (0)