MCPcopy
hub / github.com/feast-dev/feast / _safe_error_response

Function _safe_error_response

sdk/python/feast/ui_server.py:18–28  ·  view source on GitHub ↗

Return a generic error response without exposing internal details.

(
    operation: str, status_code: int = status.HTTP_400_BAD_REQUEST
)

Source from the content-addressed store, hash-verified

16
17
18def _safe_error_response(
19 operation: str, status_code: int = status.HTTP_400_BAD_REQUEST
20) -> Response:
21 """Return a generic error response without exposing internal details."""
22 return Response(
23 content=json.dumps(
24 {"detail": f"{operation} failed. Check server logs for details."}
25 ),
26 status_code=status_code,
27 media_type="application/json",
28 )
29
30
31def _build_projects_list(

Callers 10

push_labelsFunction · 0.85
get_online_labelsFunction · 0.85
list_labelsFunction · 0.85
label_qualityFunction · 0.85
batch_pushFunction · 0.85
webhook_label_ingestFunction · 0.85
export_training_datasetFunction · 0.85
webhook_configFunction · 0.85
annotation_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected