go back to concise connector builder server error messages (#19609)
This commit is contained in:
@@ -97,7 +97,7 @@ spec:
|
||||
)
|
||||
)
|
||||
except Exception as error:
|
||||
raise HTTPException(status_code=400, detail=f"Could not list streams with with error: {str(error)}")
|
||||
raise HTTPException(status_code=400, detail=f"Could not list streams with with error: {error.args[0]}")
|
||||
return StreamsListRead(streams=stream_list_read)
|
||||
|
||||
async def read_stream(self, stream_read_request_body: StreamReadRequestBody = Body(None, description="")) -> StreamRead:
|
||||
@@ -121,7 +121,7 @@ spec:
|
||||
single_slice.pages.append(message_group)
|
||||
except Exception as error:
|
||||
# TODO: We're temporarily using FastAPI's default exception model. Ideally we should use exceptions defined in the OpenAPI spec
|
||||
raise HTTPException(status_code=400, detail=f"Could not perform read with with error: {str(error)}")
|
||||
raise HTTPException(status_code=400, detail=f"Could not perform read with with error: {error.args[0]}")
|
||||
|
||||
return StreamRead(logs=log_messages, slices=[single_slice])
|
||||
|
||||
@@ -199,6 +199,6 @@ spec:
|
||||
def _create_low_code_adapter(manifest: Dict[str, Any]) -> LowCodeSourceAdapter:
|
||||
try:
|
||||
return LowCodeSourceAdapter(manifest=manifest)
|
||||
except Exception as error:
|
||||
except ValidationError as error:
|
||||
# TODO: We're temporarily using FastAPI's default exception model. Ideally we should use exceptions defined in the OpenAPI spec
|
||||
raise HTTPException(status_code=400, detail=f"Invalid connector manifest with error: {str(error)}")
|
||||
raise HTTPException(status_code=400, detail=f"Invalid connector manifest with error: {error.message}")
|
||||
|
||||
Reference in New Issue
Block a user