diff --git a/middleware/data_source_queries.py b/middleware/data_source_queries.py index f4c70e3b..ff823bce 100644 --- a/middleware/data_source_queries.py +++ b/middleware/data_source_queries.py @@ -110,7 +110,7 @@ def data_source_by_id_wrapper(arg, conn: PgConnection) -> Response: return make_response(data_source_details, 200) else: - return make_response({"message": "Data source not found."}, 404) + return make_response({"message": "Data source not found."}, 200) def get_data_sources_for_map_wrapper(conn: PgConnection): diff --git a/tests/middleware/test_data_source_queries.py b/tests/middleware/test_data_source_queries.py index 98276de8..201ca518 100644 --- a/tests/middleware/test_data_source_queries.py +++ b/tests/middleware/test_data_source_queries.py @@ -188,4 +188,4 @@ def test_data_source_by_id_wrapper_data_not_found(mock_data_source_by_id_query, mock_data_source_by_id_query.assert_called_with( data_source_id="SOURCE_UID_1", conn=mock_conn ) - mock_make_response.assert_called_with({"message": "Data source not found."}, 404) \ No newline at end of file + mock_make_response.assert_called_with({"message": "Data source not found."}, 200) \ No newline at end of file