From 9f9b96d0083a548734185bc13eb921a275e31116 Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Thu, 20 Feb 2025 20:46:36 +0000 Subject: [PATCH 1/2] Excavator: Upgrade API Version --- README.md | 622 +++++++++++++++++- docs/v1/Ontologies/models/DataValue.md | 3 +- docs/v1/Ontologies/models/EntrySetTypeDict.md | 13 + .../v1/Ontologies/models/QueryDataTypeDict.md | 1 + docs/v2/Ontologies/models/DataValue.md | 3 +- docs/v2/Ontologies/models/EntrySetType.md | 13 + docs/v2/Ontologies/models/EntrySetTypeDict.md | 13 + docs/v2/Ontologies/models/QueryDataType.md | 1 + .../v2/Ontologies/models/QueryDataTypeDict.md | 1 + foundry/__init__.py | 4 + foundry/_core/api_client.py | 19 +- foundry/_errors/__init__.py | 3 + foundry/_errors/palantir_rpc_exception.py | 11 + foundry/_errors/utils.py | 57 +- foundry/_versions.py | 2 +- .../errors/_api_feature_preview_usage_only.py | 5 +- foundry/v1/core/errors/_api_usage_denied.py | 5 +- foundry/v1/core/errors/_folder_not_found.py | 5 +- foundry/v1/core/errors/_invalid_page_size.py | 5 +- foundry/v1/core/errors/_invalid_page_token.py | 5 +- .../errors/_invalid_parameter_combination.py | 5 +- foundry/v1/core/errors/_missing_post_body.py | 5 +- .../errors/_resource_name_already_exists.py | 5 +- .../v1/core/errors/_unknown_distance_unit.py | 5 +- foundry/v1/datasets/branch.py | 15 + foundry/v1/datasets/dataset.py | 18 + .../_abort_transaction_permission_denied.py | 5 +- .../datasets/errors/_branch_already_exists.py | 5 +- .../v1/datasets/errors/_branch_not_found.py | 5 +- .../errors/_column_types_not_supported.py | 5 +- .../_commit_transaction_permission_denied.py | 5 +- .../_create_branch_permission_denied.py | 5 +- .../_create_dataset_permission_denied.py | 5 +- .../_create_transaction_permission_denied.py | 5 +- .../v1/datasets/errors/_dataset_not_found.py | 5 +- .../errors/_dataset_read_not_supported.py | 5 +- .../_delete_branch_permission_denied.py | 5 +- .../_delete_schema_permission_denied.py | 5 +- .../datasets/errors/_file_already_exists.py | 5 +- .../errors/_file_not_found_on_branch.py | 5 +- .../_file_not_found_on_transaction_range.py | 5 +- .../v1/datasets/errors/_invalid_branch_id.py | 5 +- .../errors/_invalid_transaction_type.py | 5 +- .../_open_transaction_already_exists.py | 5 +- .../errors/_put_schema_permission_denied.py | 5 +- .../errors/_read_table_permission_denied.py | 5 +- .../v1/datasets/errors/_schema_not_found.py | 5 +- .../errors/_transaction_not_committed.py | 5 +- .../datasets/errors/_transaction_not_found.py | 5 +- .../datasets/errors/_transaction_not_open.py | 5 +- .../errors/_upload_file_permission_denied.py | 5 +- foundry/v1/datasets/file.py | 18 + foundry/v1/datasets/transaction.py | 12 + foundry/v1/ontologies/action.py | 9 + foundry/v1/ontologies/action_type.py | 9 + .../_action_contains_duplicate_edits.py | 5 +- .../_action_edited_properties_not_found.py | 5 +- .../errors/_action_edits_read_only_entity.py | 5 +- .../v1/ontologies/errors/_action_not_found.py | 5 +- ...tion_parameter_interface_type_not_found.py | 5 +- .../_action_parameter_object_not_found.py | 5 +- ..._action_parameter_object_type_not_found.py | 5 +- .../errors/_action_type_not_found.py | 5 +- .../errors/_action_validation_failed.py | 5 +- ..._aggregation_group_count_exceeded_limit.py | 5 +- .../_aggregation_memory_exceeded_limit.py | 5 +- ...n_nested_object_set_size_exceeded_limit.py | 5 +- .../ontologies/errors/_apply_action_failed.py | 5 +- .../errors/_attachment_not_found.py | 5 +- .../errors/_attachment_size_exceeded_limit.py | 5 +- .../_composite_primary_key_not_supported.py | 5 +- .../_derived_property_api_names_not_unique.py | 5 +- .../ontologies/errors/_duplicate_order_by.py | 5 +- .../errors/_edit_object_permission_denied.py | 5 +- ..._function_encountered_user_facing_error.py | 5 +- .../errors/_function_execution_failed.py | 5 +- .../errors/_function_execution_timed_out.py | 5 +- .../errors/_function_invalid_input.py | 5 +- .../errors/_interface_type_not_found.py | 5 +- .../errors/_interface_types_not_found.py | 5 +- .../errors/_invalid_aggregation_ordering.py | 5 +- .../errors/_invalid_aggregation_range.py | 5 +- ...invalid_aggregation_range_property_type.py | 5 +- .../_invalid_aggregation_range_value.py | 5 +- ...invalid_apply_action_option_combination.py | 5 +- .../errors/_invalid_content_length.py | 5 +- .../errors/_invalid_content_type.py | 5 +- ...invalid_duration_group_by_property_type.py | 5 +- .../_invalid_duration_group_by_value.py | 5 +- .../v1/ontologies/errors/_invalid_fields.py | 5 +- .../v1/ontologies/errors/_invalid_group_id.py | 5 +- .../ontologies/errors/_invalid_order_type.py | 5 +- .../errors/_invalid_parameter_value.py | 5 +- .../errors/_invalid_property_filter_value.py | 5 +- .../_invalid_property_filters_combination.py | 5 +- .../errors/_invalid_property_type.py | 5 +- .../errors/_invalid_property_value.py | 5 +- .../errors/_invalid_query_parameter_value.py | 5 +- .../ontologies/errors/_invalid_range_query.py | 9 +- .../ontologies/errors/_invalid_sort_order.py | 5 +- .../ontologies/errors/_invalid_sort_type.py | 5 +- .../v1/ontologies/errors/_invalid_user_id.py | 5 +- .../ontologies/errors/_link_already_exists.py | 5 +- .../ontologies/errors/_link_type_not_found.py | 5 +- .../errors/_linked_object_not_found.py | 5 +- .../errors/_malformed_property_filters.py | 5 +- .../_marketplace_action_mapping_not_found.py | 5 +- .../_marketplace_installation_not_found.py | 5 +- .../_marketplace_link_mapping_not_found.py | 5 +- .../_marketplace_object_mapping_not_found.py | 5 +- .../_marketplace_query_mapping_not_found.py | 5 +- .../ontologies/errors/_missing_parameter.py | 5 +- ...ultiple_group_by_on_field_not_supported.py | 5 +- ..._multiple_property_values_not_supported.py | 5 +- .../errors/_object_already_exists.py | 5 +- .../v1/ontologies/errors/_object_changed.py | 5 +- .../v1/ontologies/errors/_object_not_found.py | 5 +- .../errors/_object_set_not_found.py | 5 +- .../errors/_object_type_not_found.py | 5 +- .../errors/_object_type_not_synced.py | 5 +- .../errors/_object_types_not_synced.py | 5 +- .../errors/_objects_exceeded_limit.py | 5 +- .../errors/_ontology_api_name_not_unique.py | 5 +- .../errors/_ontology_edits_exceeded_limit.py | 5 +- .../ontologies/errors/_ontology_not_found.py | 5 +- .../v1/ontologies/errors/_ontology_syncing.py | 5 +- .../errors/_ontology_syncing_object_types.py | 5 +- .../errors/_parameter_object_not_found.py | 5 +- .../_parameter_object_set_rid_not_found.py | 5 +- .../errors/_parameter_type_not_supported.py | 5 +- .../errors/_parameters_not_found.py | 5 +- .../_parent_attachment_permission_denied.py | 5 +- .../errors/_properties_have_different_ids.py | 5 +- .../errors/_properties_not_filterable.py | 5 +- .../errors/_properties_not_found.py | 5 +- .../errors/_properties_not_searchable.py | 5 +- .../errors/_properties_not_sortable.py | 5 +- .../errors/_property_api_name_not_found.py | 5 +- .../_property_base_type_not_supported.py | 5 +- .../errors/_property_filters_not_supported.py | 5 +- .../ontologies/errors/_property_not_found.py | 5 +- ...type_does_not_support_nearest_neighbors.py | 5 +- .../errors/_property_type_not_found.py | 5 +- .../_property_types_search_not_supported.py | 5 +- .../_query_encountered_user_facing_error.py | 5 +- .../errors/_query_memory_exceeded_limit.py | 5 +- .../v1/ontologies/errors/_query_not_found.py | 5 +- .../ontologies/errors/_query_runtime_error.py | 5 +- .../errors/_query_time_exceeded_limit.py | 5 +- .../_search_vector_dimensions_differ.py | 5 +- .../errors/_shared_properties_not_found.py | 5 +- .../errors/_shared_property_type_not_found.py | 5 +- .../_too_many_nearest_neighbors_requested.py | 5 +- .../ontologies/errors/_unknown_parameter.py | 5 +- .../errors/_unsupported_object_set.py | 5 +- .../errors/_view_object_permission_denied.py | 5 +- foundry/v1/ontologies/models/__init__.py | 2 + foundry/v1/ontologies/models/_data_value.py | 3 +- .../models/_query_data_type_dict.py | 13 + foundry/v1/ontologies/object_type.py | 18 + foundry/v1/ontologies/ontology.py | 6 + foundry/v1/ontologies/ontology_object.py | 24 + foundry/v1/ontologies/query.py | 3 + foundry/v1/ontologies/query_type.py | 9 + foundry/v2/admin/enrollment.py | 31 + .../_add_group_members_permission_denied.py | 5 +- .../_add_marking_members_permission_denied.py | 5 +- ...king_role_assignments_permission_denied.py | 5 +- ...r_info_for_principal_in_protected_realm.py | 5 +- .../errors/_create_group_permission_denied.py | 5 +- ...eate_marking_missing_initial_admin_role.py | 5 +- ...marking_name_in_category_already_exists.py | 5 +- .../_create_marking_permission_denied.py | 5 +- .../errors/_delete_group_permission_denied.py | 5 +- .../errors/_delete_user_permission_denied.py | 5 +- .../v2/admin/errors/_enrollment_not_found.py | 5 +- ...et_current_enrollment_permission_denied.py | 5 +- .../_get_current_user_permission_denied.py | 5 +- ...t_group_provider_info_permission_denied.py | 5 +- ..._get_marking_category_permission_denied.py | 5 +- .../errors/_get_marking_permission_denied.py | 5 +- .../_get_markings_user_permission_denied.py | 5 +- ...ofile_picture_of_user_permission_denied.py | 5 +- ...et_user_provider_info_permission_denied.py | 5 +- .../errors/_group_name_already_exists.py | 5 +- foundry/v2/admin/errors/_group_not_found.py | 5 +- .../errors/_group_provider_info_not_found.py | 5 +- .../_invalid_group_membership_expiration.py | 5 +- .../errors/_invalid_group_organizations.py | 5 +- foundry/v2/admin/errors/_invalid_host_name.py | 5 +- .../admin/errors/_invalid_profile_picture.py | 5 +- .../errors/_list_hosts_permission_denied.py | 5 +- ..._list_marking_members_permission_denied.py | 5 +- ...king_role_assignments_permission_denied.py | 5 +- .../errors/_marking_category_not_found.py | 5 +- foundry/v2/admin/errors/_marking_not_found.py | 5 +- .../admin/errors/_organization_not_found.py | 5 +- .../v2/admin/errors/_principal_not_found.py | 5 +- .../errors/_profile_picture_not_found.py | 5 +- ..._remove_group_members_permission_denied.py | 5 +- ...emove_marking_members_permission_denied.py | 5 +- ...king_role_assignments_permission_denied.py | 5 +- ...s_remove_all_administrators_not_allowed.py | 5 +- ...e_group_provider_info_permission_denied.py | 5 +- ..._replace_organization_permission_denied.py | 5 +- ...ce_user_provider_info_permission_denied.py | 5 +- .../_search_groups_permission_denied.py | 5 +- .../errors/_search_users_permission_denied.py | 5 +- foundry/v2/admin/errors/_user_not_found.py | 5 +- .../errors/_user_provider_info_not_found.py | 5 +- foundry/v2/admin/group.py | 82 +++ foundry/v2/admin/group_member.py | 49 ++ foundry/v2/admin/group_membership.py | 6 + foundry/v2/admin/group_provider_info.py | 31 + foundry/v2/admin/host.py | 31 + foundry/v2/admin/marking.py | 64 ++ foundry/v2/admin/marking_category.py | 28 + foundry/v2/admin/marking_member.py | 67 ++ foundry/v2/admin/marking_role_assignment.py | 49 ++ foundry/v2/admin/organization.py | 37 ++ foundry/v2/admin/user.py | 115 ++++ foundry/v2/admin/user_provider_info.py | 31 + foundry/v2/aip_agents/agent.py | 58 ++ foundry/v2/aip_agents/agent_version.py | 22 + foundry/v2/aip_agents/content.py | 16 + .../_agent_iterations_exceeded_limit.py | 5 +- .../v2/aip_agents/errors/_agent_not_found.py | 5 +- .../errors/_agent_version_not_found.py | 6 +- ...king_continue_session_permission_denied.py | 6 +- ..._session_failed_message_not_in_progress.py | 6 +- .../_cancel_session_permission_denied.py | 6 +- .../aip_agents/errors/_content_not_found.py | 6 +- .../errors/_context_size_exceeded_limit.py | 5 +- .../_create_session_permission_denied.py | 5 +- .../errors/_function_locator_not_found.py | 6 +- ...t_all_sessions_agents_permission_denied.py | 5 +- ...g_context_for_session_permission_denied.py | 6 +- .../errors/_invalid_agent_version.py | 5 +- .../aip_agents/errors/_invalid_parameter.py | 5 +- .../errors/_invalid_parameter_type.py | 5 +- ...t_sessions_for_agents_permission_denied.py | 5 +- .../errors/_no_published_agent_version.py | 5 +- .../errors/_object_type_ids_not_found.py | 6 +- .../errors/_object_type_rids_not_found.py | 6 +- .../aip_agents/errors/_rate_limit_exceeded.py | 5 +- .../errors/_session_execution_failed.py | 6 +- .../aip_agents/errors/_session_not_found.py | 6 +- ...ming_continue_session_permission_denied.py | 6 +- foundry/v2/aip_agents/session.py | 250 +++++++ foundry/v2/connectivity/connection.py | 82 +++ ...g_branch_name_not_supported_for_imports.py | 5 +- ...utput_dataset_not_supported_for_imports.py | 5 +- .../_connection_details_not_determined.py | 5 +- .../errors/_connection_not_found.py | 5 +- .../errors/_connection_type_not_supported.py | 5 +- .../_create_connection_permission_denied.py | 5 +- .../_create_file_import_permission_denied.py | 5 +- .../_create_table_import_permission_denied.py | 5 +- .../_delete_file_import_permission_denied.py | 5 +- .../_delete_table_import_permission_denied.py | 5 +- ...ty_must_be_specified_as_plaintext_value.py | 5 +- .../_execute_file_import_permission_denied.py | 5 +- ..._execute_table_import_permission_denied.py | 5 +- ...at_least_count_filter_invalid_min_count.py | 5 +- ...e_used_to_create_or_update_file_imports.py | 5 +- .../errors/_file_import_not_found.py | 5 +- ...ile_import_not_supported_for_connection.py | 5 +- ..._filter_greater_than_cannot_be_negative.py | 5 +- ...nvalid_greater_than_and_less_than_range.py | 5 +- ...er_less_than_must_be_one_byte_or_larger.py | 5 +- ...lter_missing_greater_than_and_less_than.py | 5 +- ..._files_count_limit_filter_invalid_limit.py | 5 +- ..._parent_folder_not_found_for_connection.py | 5 +- .../errors/_property_cannot_be_blank.py | 5 +- .../_replace_file_import_permission_denied.py | 5 +- .../errors/_secret_names_do_not_exist.py | 5 +- .../errors/_table_import_not_found.py | 5 +- ...ble_import_not_supported_for_connection.py | 5 +- .../_table_import_type_not_supported.py | 5 +- ...ecrets_for_connection_permission_denied.py | 5 +- foundry/v2/connectivity/file_import.py | 166 +++++ foundry/v2/connectivity/table_import.py | 91 +++ .../errors/_api_feature_preview_usage_only.py | 5 +- foundry/v2/core/errors/_api_usage_denied.py | 5 +- .../_batch_request_size_exceeded_limit.py | 6 +- foundry/v2/core/errors/_folder_not_found.py | 5 +- foundry/v2/core/errors/_invalid_and_filter.py | 5 +- ...valid_change_data_capture_configuration.py | 5 +- .../v2/core/errors/_invalid_field_schema.py | 5 +- .../v2/core/errors/_invalid_filter_value.py | 5 +- foundry/v2/core/errors/_invalid_or_filter.py | 5 +- foundry/v2/core/errors/_invalid_page_size.py | 5 +- foundry/v2/core/errors/_invalid_page_token.py | 5 +- .../errors/_invalid_parameter_combination.py | 5 +- foundry/v2/core/errors/_invalid_schema.py | 5 +- foundry/v2/core/errors/_invalid_time_zone.py | 5 +- .../v2/core/errors/_missing_batch_request.py | 5 +- foundry/v2/core/errors/_missing_post_body.py | 5 +- .../errors/_resource_name_already_exists.py | 5 +- .../errors/_schema_is_not_stream_schema.py | 5 +- .../v2/core/errors/_unknown_distance_unit.py | 5 +- foundry/v2/datasets/branch.py | 124 ++++ foundry/v2/datasets/dataset.py | 119 ++++ .../_abort_transaction_permission_denied.py | 5 +- .../datasets/errors/_branch_already_exists.py | 5 +- .../v2/datasets/errors/_branch_not_found.py | 5 +- .../errors/_column_types_not_supported.py | 5 +- .../_commit_transaction_permission_denied.py | 5 +- .../_create_branch_permission_denied.py | 5 +- .../_create_dataset_permission_denied.py | 5 +- .../_create_transaction_permission_denied.py | 5 +- .../v2/datasets/errors/_dataset_not_found.py | 5 +- .../errors/_dataset_read_not_supported.py | 5 +- .../_delete_branch_permission_denied.py | 5 +- .../errors/_delete_file_permission_denied.py | 5 +- .../_delete_schema_permission_denied.py | 5 +- .../datasets/errors/_file_already_exists.py | 5 +- foundry/v2/datasets/errors/_file_not_found.py | 5 +- .../errors/_file_not_found_on_branch.py | 5 +- .../_file_not_found_on_transaction_range.py | 5 +- .../_get_file_content_permission_denied.py | 5 +- .../datasets/errors/_invalid_branch_name.py | 5 +- .../errors/_invalid_transaction_type.py | 5 +- .../_open_transaction_already_exists.py | 5 +- .../errors/_put_schema_permission_denied.py | 5 +- .../_read_table_dataset_permission_denied.py | 5 +- .../v2/datasets/errors/_read_table_error.py | 5 +- .../errors/_read_table_row_limit_exceeded.py | 5 +- .../v2/datasets/errors/_read_table_timeout.py | 5 +- .../v2/datasets/errors/_schema_not_found.py | 5 +- .../errors/_transaction_not_committed.py | 5 +- .../datasets/errors/_transaction_not_found.py | 5 +- .../datasets/errors/_transaction_not_open.py | 5 +- .../errors/_upload_file_permission_denied.py | 5 +- foundry/v2/datasets/file.py | 196 ++++++ foundry/v2/datasets/transaction.py | 82 +++ ...group_to_parent_group_permission_denied.py | 5 +- .../errors/_add_markings_permission_denied.py | 5 +- .../_add_organizations_permission_denied.py | 5 +- .../_add_resource_roles_permission_denied.py | 5 +- ...te_folder_outside_project_not_supported.py | 5 +- .../_create_folder_permission_denied.py | 5 +- .../errors/_create_group_permission_denied.py | 5 +- ...project_from_template_permission_denied.py | 5 +- ...create_project_no_owner_like_role_grant.py | 5 +- .../_create_project_permission_denied.py | 5 +- .../_default_roles_not_in_space_role_set.py | 5 +- .../_delete_resource_permission_denied.py | 5 +- .../v2/filesystem/errors/_folder_not_found.py | 5 +- ...rbidden_operation_on_autosaved_resource.py | 5 +- ..._forbidden_operation_on_hidden_resource.py | 5 +- ...t_access_requirements_permission_denied.py | 5 +- .../errors/_get_by_path_permission_denied.py | 5 +- .../errors/_get_root_folder_not_supported.py | 5 +- .../_get_space_resource_not_supported.py | 5 +- .../errors/_invalid_default_roles.py | 5 +- .../filesystem/errors/_invalid_description.py | 5 +- .../errors/_invalid_display_name.py | 5 +- .../v2/filesystem/errors/_invalid_folder.py | 5 +- .../errors/_invalid_organization_hierarchy.py | 5 +- .../errors/_invalid_organizations.py | 5 +- foundry/v2/filesystem/errors/_invalid_path.py | 5 +- ...nvalid_principal_ids_for_group_template.py | 5 +- .../v2/filesystem/errors/_invalid_role_ids.py | 5 +- .../v2/filesystem/errors/_invalid_variable.py | 5 +- .../errors/_invalid_variable_enum_option.py | 5 +- .../filesystem/errors/_marking_not_found.py | 5 +- .../errors/_missing_display_name.py | 5 +- .../errors/_missing_variable_value.py | 5 +- .../_not_authorized_to_apply_organization.py | 5 +- .../_organization_marking_not_on_space.py | 5 +- .../_organization_marking_not_supported.py | 5 +- .../errors/_organizations_not_found.py | 5 +- .../v2/filesystem/errors/_path_not_found.py | 5 +- ...ently_delete_resource_permission_denied.py | 5 +- .../errors/_project_creation_not_supported.py | 5 +- .../errors/_project_name_already_exists.py | 5 +- .../filesystem/errors/_project_not_found.py | 5 +- .../errors/_project_template_not_found.py | 5 +- .../_remove_markings_permission_denied.py | 5 +- ..._remove_organizations_permission_denied.py | 5 +- ...remove_resource_roles_permission_denied.py | 5 +- .../errors/_resource_name_already_exists.py | 5 +- .../errors/_resource_not_directly_trashed.py | 5 +- .../filesystem/errors/_resource_not_found.py | 5 +- .../errors/_resource_not_trashed.py | 5 +- .../_restore_resource_permission_denied.py | 5 +- .../v2/filesystem/errors/_space_not_found.py | 5 +- .../errors/_template_group_name_conflict.py | 5 +- .../errors/_template_marking_name_conflict.py | 5 +- ...shing_autosaved_resources_not_supported.py | 5 +- ...trashing_hidden_resources_not_supported.py | 5 +- .../errors/_trashing_space_not_supported.py | 5 +- foundry/v2/filesystem/folder.py | 43 ++ foundry/v2/filesystem/project.py | 214 ++++++ foundry/v2/filesystem/resource.py | 127 ++++ foundry/v2/filesystem/resource_role.py | 37 ++ foundry/v2/filesystem/space.py | 3 + .../_execute_query_permission_denied.py | 5 +- .../_get_by_rid_queries_permission_denied.py | 5 +- .../errors/_invalid_query_parameter_value.py | 5 +- .../v2/functions/errors/_missing_parameter.py | 5 +- .../_query_encountered_user_facing_error.py | 5 +- .../errors/_query_memory_exceeded_limit.py | 5 +- .../v2/functions/errors/_query_not_found.py | 5 +- .../functions/errors/_query_runtime_error.py | 5 +- .../errors/_query_time_exceeded_limit.py | 5 +- .../v2/functions/errors/_unknown_parameter.py | 5 +- .../functions/errors/_value_type_not_found.py | 5 +- .../functions/errors/_version_id_not_found.py | 5 +- foundry/v2/functions/query.py | 46 ++ foundry/v2/functions/value_type.py | 16 + foundry/v2/functions/version_id.py | 16 + .../_conflicting_media_set_identifiers.py | 5 +- .../errors/_media_item_not_found.py | 5 +- foundry/v2/media_sets/media_set.py | 21 + foundry/v2/ontologies/action.py | 6 + foundry/v2/ontologies/action_type.py | 9 + foundry/v2/ontologies/attachment.py | 9 + foundry/v2/ontologies/attachment_property.py | 12 + .../_action_contains_duplicate_edits.py | 5 +- .../_action_edited_properties_not_found.py | 5 +- .../errors/_action_edits_read_only_entity.py | 5 +- .../v2/ontologies/errors/_action_not_found.py | 5 +- ...tion_parameter_interface_type_not_found.py | 5 +- .../_action_parameter_object_not_found.py | 5 +- ..._action_parameter_object_type_not_found.py | 5 +- .../errors/_action_type_not_found.py | 5 +- .../errors/_action_validation_failed.py | 5 +- ..._aggregation_group_count_exceeded_limit.py | 5 +- .../_aggregation_memory_exceeded_limit.py | 5 +- ...n_nested_object_set_size_exceeded_limit.py | 5 +- .../ontologies/errors/_apply_action_failed.py | 5 +- .../errors/_attachment_not_found.py | 5 +- .../errors/_attachment_size_exceeded_limit.py | 5 +- .../_composite_primary_key_not_supported.py | 5 +- .../_derived_property_api_names_not_unique.py | 5 +- .../ontologies/errors/_duplicate_order_by.py | 5 +- .../errors/_edit_object_permission_denied.py | 5 +- ..._function_encountered_user_facing_error.py | 5 +- .../errors/_function_execution_failed.py | 5 +- .../errors/_function_execution_timed_out.py | 5 +- .../errors/_function_invalid_input.py | 5 +- .../errors/_interface_type_not_found.py | 5 +- .../errors/_interface_types_not_found.py | 5 +- .../errors/_invalid_aggregation_ordering.py | 5 +- .../errors/_invalid_aggregation_range.py | 5 +- ...invalid_aggregation_range_property_type.py | 5 +- .../_invalid_aggregation_range_value.py | 5 +- ...invalid_apply_action_option_combination.py | 5 +- .../errors/_invalid_content_length.py | 5 +- .../errors/_invalid_content_type.py | 5 +- ...invalid_duration_group_by_property_type.py | 5 +- .../_invalid_duration_group_by_value.py | 5 +- .../v2/ontologies/errors/_invalid_fields.py | 5 +- .../v2/ontologies/errors/_invalid_group_id.py | 5 +- .../ontologies/errors/_invalid_order_type.py | 5 +- .../errors/_invalid_parameter_value.py | 5 +- .../errors/_invalid_property_filter_value.py | 5 +- .../_invalid_property_filters_combination.py | 5 +- .../errors/_invalid_property_type.py | 5 +- .../errors/_invalid_property_value.py | 5 +- .../errors/_invalid_query_parameter_value.py | 5 +- .../ontologies/errors/_invalid_range_query.py | 9 +- .../ontologies/errors/_invalid_sort_order.py | 5 +- .../ontologies/errors/_invalid_sort_type.py | 5 +- .../v2/ontologies/errors/_invalid_user_id.py | 5 +- .../ontologies/errors/_link_already_exists.py | 5 +- .../ontologies/errors/_link_type_not_found.py | 5 +- .../errors/_linked_object_not_found.py | 5 +- .../errors/_malformed_property_filters.py | 5 +- .../_marketplace_action_mapping_not_found.py | 5 +- .../_marketplace_installation_not_found.py | 5 +- .../_marketplace_link_mapping_not_found.py | 5 +- .../_marketplace_object_mapping_not_found.py | 5 +- .../_marketplace_query_mapping_not_found.py | 5 +- .../ontologies/errors/_missing_parameter.py | 5 +- ...ultiple_group_by_on_field_not_supported.py | 5 +- ..._multiple_property_values_not_supported.py | 5 +- .../errors/_object_already_exists.py | 5 +- .../v2/ontologies/errors/_object_changed.py | 5 +- .../v2/ontologies/errors/_object_not_found.py | 5 +- .../errors/_object_set_not_found.py | 5 +- .../errors/_object_type_not_found.py | 5 +- .../errors/_object_type_not_synced.py | 5 +- .../errors/_object_types_not_synced.py | 5 +- .../errors/_objects_exceeded_limit.py | 5 +- .../errors/_ontology_api_name_not_unique.py | 5 +- .../errors/_ontology_edits_exceeded_limit.py | 5 +- .../ontologies/errors/_ontology_not_found.py | 5 +- .../v2/ontologies/errors/_ontology_syncing.py | 5 +- .../errors/_ontology_syncing_object_types.py | 5 +- .../errors/_parameter_object_not_found.py | 5 +- .../_parameter_object_set_rid_not_found.py | 5 +- .../errors/_parameter_type_not_supported.py | 5 +- .../errors/_parameters_not_found.py | 5 +- .../_parent_attachment_permission_denied.py | 5 +- .../errors/_properties_have_different_ids.py | 5 +- .../errors/_properties_not_filterable.py | 5 +- .../errors/_properties_not_found.py | 5 +- .../errors/_properties_not_searchable.py | 5 +- .../errors/_properties_not_sortable.py | 5 +- .../errors/_property_api_name_not_found.py | 5 +- .../_property_base_type_not_supported.py | 5 +- .../errors/_property_filters_not_supported.py | 5 +- .../ontologies/errors/_property_not_found.py | 5 +- ...type_does_not_support_nearest_neighbors.py | 5 +- .../errors/_property_type_not_found.py | 5 +- .../_property_types_search_not_supported.py | 5 +- .../_query_encountered_user_facing_error.py | 5 +- .../errors/_query_memory_exceeded_limit.py | 5 +- .../v2/ontologies/errors/_query_not_found.py | 5 +- .../ontologies/errors/_query_runtime_error.py | 5 +- .../errors/_query_time_exceeded_limit.py | 5 +- .../_search_vector_dimensions_differ.py | 5 +- .../errors/_shared_properties_not_found.py | 5 +- .../errors/_shared_property_type_not_found.py | 5 +- .../_too_many_nearest_neighbors_requested.py | 5 +- .../ontologies/errors/_unknown_parameter.py | 5 +- .../errors/_unsupported_object_set.py | 5 +- .../errors/_view_object_permission_denied.py | 5 +- foundry/v2/ontologies/linked_object.py | 9 + foundry/v2/ontologies/models/__init__.py | 4 + foundry/v2/ontologies/models/_data_value.py | 3 +- .../v2/ontologies/models/_query_data_type.py | 18 + .../models/_query_data_type_dict.py | 13 + foundry/v2/ontologies/object_type.py | 18 + foundry/v2/ontologies/ontology.py | 6 + foundry/v2/ontologies/ontology_interface.py | 12 + foundry/v2/ontologies/ontology_object.py | 18 + foundry/v2/ontologies/ontology_object_set.py | 12 + foundry/v2/ontologies/query.py | 3 + foundry/v2/ontologies/query_type.py | 9 + .../v2/ontologies/time_series_property_v2.py | 9 + foundry/v2/orchestration/build.py | 64 ++ .../errors/_build_inputs_not_found.py | 5 +- .../errors/_build_inputs_permission_denied.py | 5 +- .../orchestration/errors/_build_not_found.py | 5 +- .../_build_targets_missing_job_specs.py | 5 +- .../errors/_build_targets_not_found.py | 5 +- .../_build_targets_permission_denied.py | 5 +- .../errors/_build_targets_resolution_error.py | 5 +- .../errors/_cancel_build_permission_denied.py | 5 +- .../_create_builds_permission_denied.py | 5 +- .../_create_schedule_permission_denied.py | 5 +- .../_delete_schedule_permission_denied.py | 5 +- .../errors/_invalid_and_trigger.py | 5 +- .../errors/_invalid_media_set_trigger.py | 5 +- .../errors/_invalid_or_trigger.py | 5 +- .../errors/_invalid_schedule_description.py | 5 +- .../errors/_invalid_schedule_name.py | 5 +- .../errors/_invalid_time_trigger.py | 5 +- .../v2/orchestration/errors/_job_not_found.py | 5 +- .../errors/_missing_build_targets.py | 5 +- .../_missing_connecting_build_inputs.py | 5 +- .../orchestration/errors/_missing_trigger.py | 5 +- .../_pause_schedule_permission_denied.py | 5 +- .../_replace_schedule_permission_denied.py | 5 +- .../errors/_run_schedule_permission_denied.py | 5 +- .../errors/_schedule_not_found.py | 5 +- .../_schedule_trigger_resources_not_found.py | 5 +- ...ule_trigger_resources_permission_denied.py | 5 +- .../errors/_schedule_version_not_found.py | 5 +- .../_search_builds_permission_denied.py | 5 +- .../errors/_target_not_supported.py | 5 +- .../_unpause_schedule_permission_denied.py | 5 +- foundry/v2/orchestration/job.py | 16 + foundry/v2/orchestration/schedule.py | 112 ++++ foundry/v2/orchestration/schedule_version.py | 19 + foundry/v2/streams/dataset.py | 23 + ...create_streaming_dataset_in_user_folder.py | 5 +- .../errors/_cannot_write_to_trashed_stream.py | 5 +- .../_create_stream_permission_denied.py | 5 +- ...ate_streaming_dataset_permission_denied.py | 5 +- .../_failed_to_process_binary_record.py | 5 +- .../errors/_invalid_stream_no_schema.py | 5 +- .../v2/streams/errors/_invalid_stream_type.py | 5 +- ...nary_record_to_stream_permission_denied.py | 5 +- ...lish_record_to_stream_permission_denied.py | 5 +- ...ish_records_to_stream_permission_denied.py | 5 +- .../_record_does_not_match_stream_schema.py | 5 +- .../v2/streams/errors/_record_too_large.py | 5 +- .../errors/_reset_stream_permission_denied.py | 5 +- .../v2/streams/errors/_stream_not_found.py | 5 +- foundry/v2/streams/errors/_view_not_found.py | 5 +- foundry/v2/streams/stream.py | 91 +++ .../errors/_cannot_delete_deployed_version.py | 5 +- .../_delete_version_permission_denied.py | 6 +- .../_deploy_website_permission_denied.py | 5 +- .../errors/_file_count_limit_exceeded.py | 5 +- .../errors/_file_size_limit_exceeded.py | 5 +- .../errors/_invalid_version.py | 5 +- .../_third_party_application_not_found.py | 5 +- .../_undeploy_website_permission_denied.py | 5 +- ...load_snapshot_version_permission_denied.py | 5 +- .../_upload_version_permission_denied.py | 5 +- .../errors/_version_already_exists.py | 5 +- .../errors/_version_limit_exceeded.py | 5 +- .../errors/_version_not_found.py | 6 +- .../errors/_website_not_found.py | 5 +- .../third_party_application.py | 16 + .../v2/third_party_applications/version.py | 67 ++ .../v2/third_party_applications/website.py | 46 ++ tests/test_api_client.py | 26 +- tests/test_errors.py | 26 +- 605 files changed, 4880 insertions(+), 1669 deletions(-) create mode 100644 docs/v1/Ontologies/models/EntrySetTypeDict.md create mode 100644 docs/v2/Ontologies/models/EntrySetType.md create mode 100644 docs/v2/Ontologies/models/EntrySetTypeDict.md diff --git a/README.md b/README.md index b726f8f1f..0c1f342f6 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ Want to learn more about this Foundry SDK library? Review the following sections ↳ [Static type analysis](#static-types): Learn about the static type analysis capabilities of this library ↳ [HTTP Session Configuration](#session-config): Learn how to configure the HTTP session. + ## Error handling ### Data validation The SDK employs [Pydantic](https://docs.pydantic.dev/latest/) for runtime validation @@ -206,26 +207,57 @@ the [Pydantic error documentation](https://docs.pydantic.dev/latest/errors/error experience. See [Static Type Analysis](#static-types) below for more information. ### HTTP exceptions -When an HTTP error status is returned, a `PalantirRPCException` is thrown. There are several -subclasses that be caught for more specific conditions, all of which inherit from -`PalantirRPCException`. - - -| Status Code | Error Class | -| ----------- | -------------------------- | -| 400 | `BadRequestError` | -| 401 | `UnauthorizedError` | -| 403 | `PermissionDeniedError` | -| 404 | `NotFoundError` | -| 422 | `UnprocessableEntityError` | -| 429 | `RateLimitError` | -| >=500,<600 | `InternalServerError` | -| Other | `PalantirRPCException` | +Each operation includes a list of possible exceptions that can be thrown which can be thrown by +the server, all of which inherit from `PalantirRPCException`. For example, an operation that interacts +with datasets might throw a `DatasetNotFound` error, which is defined as follows: + +```python +class DatasetNotFoundParameters(TypedDict): + """The given Dataset could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + datasetRid: DatasetRid + + +@dataclass +class DatasetNotFound(NotFoundError): + name: Literal["DatasetNotFound"] + parameters: DatasetNotFoundParameters + error_instance_id: str +``` + +As a user, you can catch this exception and handle it accordingly. + +```python +from foundry.v2.datasets.errors import DatasetNotFound + +try: + dataset = foundry_client.datasets.Dataset.get("ri.foundry.main.dataset.abc") + ... +except DatasetNotFound as e: + print("Dataset not found", e.parameters["datasetRid"]) +``` + +You can refer to the method documentation to see which exceptions can be thrown. It is also possible to +catch a generic subclass of `PalantirRPCException` such as `BadRequestError` or `NotFoundError`. + + +| Status Code | Error Class | +| ----------- | ---------------------------- | +| 400 | `BadRequestError` | +| 401 | `UnauthorizedError` | +| 403 | `PermissionDeniedError` | +| 404 | `NotFoundError` | +| 413 | `RequestEntityTooLargeError` | +| 422 | `UnprocessableEntityError` | +| 429 | `RateLimitError` | +| >=500,<600 | `InternalServerError` | +| Other | `PalantirRPCException` | ```python from foundry import PalantirRPCException from foundry import NotFoundError -from foundry import RateLimitError try: @@ -233,8 +265,6 @@ try: ... except NotFoundError as e: print("Dataset or Transaction not found", e) -except RateLimitError as e: - print("We are aborting too many Transactions", e) except PalantirRPCException as e: print("Another HTTP exception occurred", e) ``` @@ -250,17 +280,19 @@ All HTTP exceptions will have the following properties. See the [Foundry API doc ### Other exceptions There are a handful of other exception classes that could be thrown when instantiating or using a client. -| ErrorClass | Thrown Directly | Description | -| ------------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| NotAuthenticated | Yes | You used either `ConfidentialClientAuth` or `PublicClientAuth` to make an API call without going through the OAuth process first. | -| ConnectionError | Yes | An issue occurred when connecting to the server. This also catches `ProxyError`. | -| ProxyError | Yes | An issue occurred when connecting to or authenticating with a proxy server. | -| TimeoutError | No | The request timed out. This catches both `ConnectTimeout`, `ReadTimeout` and `WriteTimeout`. | -| ConnectTimeout | Yes | The request timed out when attempting to connect to the server. | -| ReadTimeout | Yes | The server did not send any data in the allotted amount of time. | -| WriteTimeout | Yes | There was a timeout when writing data to the server. | -| StreamConsumedError | Yes | The content of the given stream has already been consumed. | -| SDKInternalError | Yes | An unexpected issue occurred and should be reported. | +| ErrorClass | Thrown Directly | Description | +| -------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| NotAuthenticated | Yes | You used either `ConfidentialClientAuth` or `PublicClientAuth` to make an API call without going through the OAuth process first. | +| ConnectionError | Yes | An issue occurred when connecting to the server. This also catches `ProxyError`. | +| ProxyError | Yes | An issue occurred when connecting to or authenticating with a proxy server. | +| TimeoutError | No | The request timed out. This catches both `ConnectTimeout`, `ReadTimeout` and `WriteTimeout`. | +| ConnectTimeout | Yes | The request timed out when attempting to connect to the server. | +| ReadTimeout | Yes | The server did not send any data in the allotted amount of time. | +| WriteTimeout | Yes | There was a timeout when writing data to the server. | +| StreamConsumedError | Yes | The content of the given stream has already been consumed. | +| RequestEntityTooLargeError | Yes | The request entity is too large. | +| ConflictError | Yes | There was a conflict with another request. | +| SDKInternalError | Yes | An unexpected issue occurred and should be reported. | ## Pagination @@ -1382,6 +1414,8 @@ Namespace | Name | Import | **Ontologies** | [DoesNotIntersectPolygonQueryDict](docs/v2/Ontologies/models/DoesNotIntersectPolygonQueryDict.md) | `from foundry.v2.ontologies.models import DoesNotIntersectPolygonQueryDict` | **Ontologies** | [DoubleVector](docs/v2/Ontologies/models/DoubleVector.md) | `from foundry.v2.ontologies.models import DoubleVector` | **Ontologies** | [DoubleVectorDict](docs/v2/Ontologies/models/DoubleVectorDict.md) | `from foundry.v2.ontologies.models import DoubleVectorDict` | +**Ontologies** | [EntrySetType](docs/v2/Ontologies/models/EntrySetType.md) | `from foundry.v2.ontologies.models import EntrySetType` | +**Ontologies** | [EntrySetTypeDict](docs/v2/Ontologies/models/EntrySetTypeDict.md) | `from foundry.v2.ontologies.models import EntrySetTypeDict` | **Ontologies** | [EqualsQueryV2](docs/v2/Ontologies/models/EqualsQueryV2.md) | `from foundry.v2.ontologies.models import EqualsQueryV2` | **Ontologies** | [EqualsQueryV2Dict](docs/v2/Ontologies/models/EqualsQueryV2Dict.md) | `from foundry.v2.ontologies.models import EqualsQueryV2Dict` | **Ontologies** | [ExactDistinctAggregationV2](docs/v2/Ontologies/models/ExactDistinctAggregationV2.md) | `from foundry.v2.ontologies.models import ExactDistinctAggregationV2` | @@ -2003,6 +2037,7 @@ Namespace | Name | Import | **Ontologies** | [DeleteObjectRuleDict](docs/v1/Ontologies/models/DeleteObjectRuleDict.md) | `from foundry.v1.ontologies.models import DeleteObjectRuleDict` | **Ontologies** | [DerivedPropertyApiName](docs/v1/Ontologies/models/DerivedPropertyApiName.md) | `from foundry.v1.ontologies.models import DerivedPropertyApiName` | **Ontologies** | [Duration](docs/v1/Ontologies/models/Duration.md) | `from foundry.v1.ontologies.models import Duration` | +**Ontologies** | [EntrySetTypeDict](docs/v1/Ontologies/models/EntrySetTypeDict.md) | `from foundry.v1.ontologies.models import EntrySetTypeDict` | **Ontologies** | [EqualsQuery](docs/v1/Ontologies/models/EqualsQuery.md) | `from foundry.v1.ontologies.models import EqualsQuery` | **Ontologies** | [EqualsQueryDict](docs/v1/Ontologies/models/EqualsQueryDict.md) | `from foundry.v1.ontologies.models import EqualsQueryDict` | **Ontologies** | [ExecuteQueryResponse](docs/v1/Ontologies/models/ExecuteQueryResponse.md) | `from foundry.v1.ontologies.models import ExecuteQueryResponse` | @@ -2163,6 +2198,535 @@ Namespace | Name | Import | **Ontologies** | [ValueType](docs/v1/Ontologies/models/ValueType.md) | `from foundry.v1.ontologies.models import ValueType` | + +## Documentation for errors + +## Documentation for V2 errors + +Namespace | Name | Import | +--------- | ---- | ------ | +**Admin** | AddGroupMembersPermissionDenied | `from foundry.v2.admin.errors import AddGroupMembersPermissionDenied` | +**Admin** | AddMarkingMembersPermissionDenied | `from foundry.v2.admin.errors import AddMarkingMembersPermissionDenied` | +**Admin** | AddMarkingRoleAssignmentsPermissionDenied | `from foundry.v2.admin.errors import AddMarkingRoleAssignmentsPermissionDenied` | +**Admin** | CannotReplaceProviderInfoForPrincipalInProtectedRealm | `from foundry.v2.admin.errors import CannotReplaceProviderInfoForPrincipalInProtectedRealm` | +**Admin** | CreateGroupPermissionDenied | `from foundry.v2.admin.errors import CreateGroupPermissionDenied` | +**Admin** | CreateMarkingMissingInitialAdminRole | `from foundry.v2.admin.errors import CreateMarkingMissingInitialAdminRole` | +**Admin** | CreateMarkingNameInCategoryAlreadyExists | `from foundry.v2.admin.errors import CreateMarkingNameInCategoryAlreadyExists` | +**Admin** | CreateMarkingPermissionDenied | `from foundry.v2.admin.errors import CreateMarkingPermissionDenied` | +**Admin** | DeleteGroupPermissionDenied | `from foundry.v2.admin.errors import DeleteGroupPermissionDenied` | +**Admin** | DeleteUserPermissionDenied | `from foundry.v2.admin.errors import DeleteUserPermissionDenied` | +**Admin** | EnrollmentNotFound | `from foundry.v2.admin.errors import EnrollmentNotFound` | +**Admin** | GetCurrentEnrollmentPermissionDenied | `from foundry.v2.admin.errors import GetCurrentEnrollmentPermissionDenied` | +**Admin** | GetCurrentUserPermissionDenied | `from foundry.v2.admin.errors import GetCurrentUserPermissionDenied` | +**Admin** | GetGroupProviderInfoPermissionDenied | `from foundry.v2.admin.errors import GetGroupProviderInfoPermissionDenied` | +**Admin** | GetMarkingCategoryPermissionDenied | `from foundry.v2.admin.errors import GetMarkingCategoryPermissionDenied` | +**Admin** | GetMarkingPermissionDenied | `from foundry.v2.admin.errors import GetMarkingPermissionDenied` | +**Admin** | GetMarkingsUserPermissionDenied | `from foundry.v2.admin.errors import GetMarkingsUserPermissionDenied` | +**Admin** | GetProfilePictureOfUserPermissionDenied | `from foundry.v2.admin.errors import GetProfilePictureOfUserPermissionDenied` | +**Admin** | GetUserProviderInfoPermissionDenied | `from foundry.v2.admin.errors import GetUserProviderInfoPermissionDenied` | +**Admin** | GroupNameAlreadyExists | `from foundry.v2.admin.errors import GroupNameAlreadyExists` | +**Admin** | GroupNotFound | `from foundry.v2.admin.errors import GroupNotFound` | +**Admin** | GroupProviderInfoNotFound | `from foundry.v2.admin.errors import GroupProviderInfoNotFound` | +**Admin** | InvalidGroupMembershipExpiration | `from foundry.v2.admin.errors import InvalidGroupMembershipExpiration` | +**Admin** | InvalidGroupOrganizations | `from foundry.v2.admin.errors import InvalidGroupOrganizations` | +**Admin** | InvalidHostName | `from foundry.v2.admin.errors import InvalidHostName` | +**Admin** | InvalidProfilePicture | `from foundry.v2.admin.errors import InvalidProfilePicture` | +**Admin** | ListHostsPermissionDenied | `from foundry.v2.admin.errors import ListHostsPermissionDenied` | +**Admin** | ListMarkingMembersPermissionDenied | `from foundry.v2.admin.errors import ListMarkingMembersPermissionDenied` | +**Admin** | ListMarkingRoleAssignmentsPermissionDenied | `from foundry.v2.admin.errors import ListMarkingRoleAssignmentsPermissionDenied` | +**Admin** | MarkingCategoryNotFound | `from foundry.v2.admin.errors import MarkingCategoryNotFound` | +**Admin** | MarkingNotFound | `from foundry.v2.admin.errors import MarkingNotFound` | +**Admin** | OrganizationNotFound | `from foundry.v2.admin.errors import OrganizationNotFound` | +**Admin** | PrincipalNotFound | `from foundry.v2.admin.errors import PrincipalNotFound` | +**Admin** | ProfilePictureNotFound | `from foundry.v2.admin.errors import ProfilePictureNotFound` | +**Admin** | RemoveGroupMembersPermissionDenied | `from foundry.v2.admin.errors import RemoveGroupMembersPermissionDenied` | +**Admin** | RemoveMarkingMembersPermissionDenied | `from foundry.v2.admin.errors import RemoveMarkingMembersPermissionDenied` | +**Admin** | RemoveMarkingRoleAssignmentsPermissionDenied | `from foundry.v2.admin.errors import RemoveMarkingRoleAssignmentsPermissionDenied` | +**Admin** | RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed | `from foundry.v2.admin.errors import RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed` | +**Admin** | ReplaceGroupProviderInfoPermissionDenied | `from foundry.v2.admin.errors import ReplaceGroupProviderInfoPermissionDenied` | +**Admin** | ReplaceOrganizationPermissionDenied | `from foundry.v2.admin.errors import ReplaceOrganizationPermissionDenied` | +**Admin** | ReplaceUserProviderInfoPermissionDenied | `from foundry.v2.admin.errors import ReplaceUserProviderInfoPermissionDenied` | +**Admin** | SearchGroupsPermissionDenied | `from foundry.v2.admin.errors import SearchGroupsPermissionDenied` | +**Admin** | SearchUsersPermissionDenied | `from foundry.v2.admin.errors import SearchUsersPermissionDenied` | +**Admin** | UserNotFound | `from foundry.v2.admin.errors import UserNotFound` | +**Admin** | UserProviderInfoNotFound | `from foundry.v2.admin.errors import UserProviderInfoNotFound` | +**AipAgents** | AgentIterationsExceededLimit | `from foundry.v2.aip_agents.errors import AgentIterationsExceededLimit` | +**AipAgents** | AgentNotFound | `from foundry.v2.aip_agents.errors import AgentNotFound` | +**AipAgents** | AgentVersionNotFound | `from foundry.v2.aip_agents.errors import AgentVersionNotFound` | +**AipAgents** | BlockingContinueSessionPermissionDenied | `from foundry.v2.aip_agents.errors import BlockingContinueSessionPermissionDenied` | +**AipAgents** | CancelSessionFailedMessageNotInProgress | `from foundry.v2.aip_agents.errors import CancelSessionFailedMessageNotInProgress` | +**AipAgents** | CancelSessionPermissionDenied | `from foundry.v2.aip_agents.errors import CancelSessionPermissionDenied` | +**AipAgents** | ContentNotFound | `from foundry.v2.aip_agents.errors import ContentNotFound` | +**AipAgents** | ContextSizeExceededLimit | `from foundry.v2.aip_agents.errors import ContextSizeExceededLimit` | +**AipAgents** | CreateSessionPermissionDenied | `from foundry.v2.aip_agents.errors import CreateSessionPermissionDenied` | +**AipAgents** | FunctionLocatorNotFound | `from foundry.v2.aip_agents.errors import FunctionLocatorNotFound` | +**AipAgents** | GetAllSessionsAgentsPermissionDenied | `from foundry.v2.aip_agents.errors import GetAllSessionsAgentsPermissionDenied` | +**AipAgents** | GetRagContextForSessionPermissionDenied | `from foundry.v2.aip_agents.errors import GetRagContextForSessionPermissionDenied` | +**AipAgents** | InvalidAgentVersion | `from foundry.v2.aip_agents.errors import InvalidAgentVersion` | +**AipAgents** | InvalidParameter | `from foundry.v2.aip_agents.errors import InvalidParameter` | +**AipAgents** | InvalidParameterType | `from foundry.v2.aip_agents.errors import InvalidParameterType` | +**AipAgents** | ListSessionsForAgentsPermissionDenied | `from foundry.v2.aip_agents.errors import ListSessionsForAgentsPermissionDenied` | +**AipAgents** | NoPublishedAgentVersion | `from foundry.v2.aip_agents.errors import NoPublishedAgentVersion` | +**AipAgents** | ObjectTypeIdsNotFound | `from foundry.v2.aip_agents.errors import ObjectTypeIdsNotFound` | +**AipAgents** | ObjectTypeRidsNotFound | `from foundry.v2.aip_agents.errors import ObjectTypeRidsNotFound` | +**AipAgents** | RateLimitExceeded | `from foundry.v2.aip_agents.errors import RateLimitExceeded` | +**AipAgents** | SessionExecutionFailed | `from foundry.v2.aip_agents.errors import SessionExecutionFailed` | +**AipAgents** | SessionNotFound | `from foundry.v2.aip_agents.errors import SessionNotFound` | +**AipAgents** | StreamingContinueSessionPermissionDenied | `from foundry.v2.aip_agents.errors import StreamingContinueSessionPermissionDenied` | +**Connectivity** | ChangingBranchNameNotSupportedForImports | `from foundry.v2.connectivity.errors import ChangingBranchNameNotSupportedForImports` | +**Connectivity** | ChangingOutputDatasetNotSupportedForImports | `from foundry.v2.connectivity.errors import ChangingOutputDatasetNotSupportedForImports` | +**Connectivity** | ConnectionDetailsNotDetermined | `from foundry.v2.connectivity.errors import ConnectionDetailsNotDetermined` | +**Connectivity** | ConnectionNotFound | `from foundry.v2.connectivity.errors import ConnectionNotFound` | +**Connectivity** | ConnectionTypeNotSupported | `from foundry.v2.connectivity.errors import ConnectionTypeNotSupported` | +**Connectivity** | CreateConnectionPermissionDenied | `from foundry.v2.connectivity.errors import CreateConnectionPermissionDenied` | +**Connectivity** | CreateFileImportPermissionDenied | `from foundry.v2.connectivity.errors import CreateFileImportPermissionDenied` | +**Connectivity** | CreateTableImportPermissionDenied | `from foundry.v2.connectivity.errors import CreateTableImportPermissionDenied` | +**Connectivity** | DeleteFileImportPermissionDenied | `from foundry.v2.connectivity.errors import DeleteFileImportPermissionDenied` | +**Connectivity** | DeleteTableImportPermissionDenied | `from foundry.v2.connectivity.errors import DeleteTableImportPermissionDenied` | +**Connectivity** | EncryptedPropertyMustBeSpecifiedAsPlaintextValue | `from foundry.v2.connectivity.errors import EncryptedPropertyMustBeSpecifiedAsPlaintextValue` | +**Connectivity** | ExecuteFileImportPermissionDenied | `from foundry.v2.connectivity.errors import ExecuteFileImportPermissionDenied` | +**Connectivity** | ExecuteTableImportPermissionDenied | `from foundry.v2.connectivity.errors import ExecuteTableImportPermissionDenied` | +**Connectivity** | FileAtLeastCountFilterInvalidMinCount | `from foundry.v2.connectivity.errors import FileAtLeastCountFilterInvalidMinCount` | +**Connectivity** | FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports | `from foundry.v2.connectivity.errors import FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports` | +**Connectivity** | FileImportNotFound | `from foundry.v2.connectivity.errors import FileImportNotFound` | +**Connectivity** | FileImportNotSupportedForConnection | `from foundry.v2.connectivity.errors import FileImportNotSupportedForConnection` | +**Connectivity** | FilesCountLimitFilterInvalidLimit | `from foundry.v2.connectivity.errors import FilesCountLimitFilterInvalidLimit` | +**Connectivity** | FileSizeFilterGreaterThanCannotBeNegative | `from foundry.v2.connectivity.errors import FileSizeFilterGreaterThanCannotBeNegative` | +**Connectivity** | FileSizeFilterInvalidGreaterThanAndLessThanRange | `from foundry.v2.connectivity.errors import FileSizeFilterInvalidGreaterThanAndLessThanRange` | +**Connectivity** | FileSizeFilterLessThanMustBeOneByteOrLarger | `from foundry.v2.connectivity.errors import FileSizeFilterLessThanMustBeOneByteOrLarger` | +**Connectivity** | FileSizeFilterMissingGreaterThanAndLessThan | `from foundry.v2.connectivity.errors import FileSizeFilterMissingGreaterThanAndLessThan` | +**Connectivity** | ParentFolderNotFoundForConnection | `from foundry.v2.connectivity.errors import ParentFolderNotFoundForConnection` | +**Connectivity** | PropertyCannotBeBlank | `from foundry.v2.connectivity.errors import PropertyCannotBeBlank` | +**Connectivity** | ReplaceFileImportPermissionDenied | `from foundry.v2.connectivity.errors import ReplaceFileImportPermissionDenied` | +**Connectivity** | SecretNamesDoNotExist | `from foundry.v2.connectivity.errors import SecretNamesDoNotExist` | +**Connectivity** | TableImportNotFound | `from foundry.v2.connectivity.errors import TableImportNotFound` | +**Connectivity** | TableImportNotSupportedForConnection | `from foundry.v2.connectivity.errors import TableImportNotSupportedForConnection` | +**Connectivity** | TableImportTypeNotSupported | `from foundry.v2.connectivity.errors import TableImportTypeNotSupported` | +**Connectivity** | UpdateSecretsForConnectionPermissionDenied | `from foundry.v2.connectivity.errors import UpdateSecretsForConnectionPermissionDenied` | +**Core** | ApiFeaturePreviewUsageOnly | `from foundry.v2.core.errors import ApiFeaturePreviewUsageOnly` | +**Core** | ApiUsageDenied | `from foundry.v2.core.errors import ApiUsageDenied` | +**Core** | BatchRequestSizeExceededLimit | `from foundry.v2.core.errors import BatchRequestSizeExceededLimit` | +**Core** | FolderNotFound | `from foundry.v2.core.errors import FolderNotFound` | +**Core** | InvalidAndFilter | `from foundry.v2.core.errors import InvalidAndFilter` | +**Core** | InvalidChangeDataCaptureConfiguration | `from foundry.v2.core.errors import InvalidChangeDataCaptureConfiguration` | +**Core** | InvalidFieldSchema | `from foundry.v2.core.errors import InvalidFieldSchema` | +**Core** | InvalidFilterValue | `from foundry.v2.core.errors import InvalidFilterValue` | +**Core** | InvalidOrFilter | `from foundry.v2.core.errors import InvalidOrFilter` | +**Core** | InvalidPageSize | `from foundry.v2.core.errors import InvalidPageSize` | +**Core** | InvalidPageToken | `from foundry.v2.core.errors import InvalidPageToken` | +**Core** | InvalidParameterCombination | `from foundry.v2.core.errors import InvalidParameterCombination` | +**Core** | InvalidSchema | `from foundry.v2.core.errors import InvalidSchema` | +**Core** | InvalidTimeZone | `from foundry.v2.core.errors import InvalidTimeZone` | +**Core** | MissingBatchRequest | `from foundry.v2.core.errors import MissingBatchRequest` | +**Core** | MissingPostBody | `from foundry.v2.core.errors import MissingPostBody` | +**Core** | ResourceNameAlreadyExists | `from foundry.v2.core.errors import ResourceNameAlreadyExists` | +**Core** | SchemaIsNotStreamSchema | `from foundry.v2.core.errors import SchemaIsNotStreamSchema` | +**Core** | UnknownDistanceUnit | `from foundry.v2.core.errors import UnknownDistanceUnit` | +**Datasets** | AbortTransactionPermissionDenied | `from foundry.v2.datasets.errors import AbortTransactionPermissionDenied` | +**Datasets** | BranchAlreadyExists | `from foundry.v2.datasets.errors import BranchAlreadyExists` | +**Datasets** | BranchNotFound | `from foundry.v2.datasets.errors import BranchNotFound` | +**Datasets** | ColumnTypesNotSupported | `from foundry.v2.datasets.errors import ColumnTypesNotSupported` | +**Datasets** | CommitTransactionPermissionDenied | `from foundry.v2.datasets.errors import CommitTransactionPermissionDenied` | +**Datasets** | CreateBranchPermissionDenied | `from foundry.v2.datasets.errors import CreateBranchPermissionDenied` | +**Datasets** | CreateDatasetPermissionDenied | `from foundry.v2.datasets.errors import CreateDatasetPermissionDenied` | +**Datasets** | CreateTransactionPermissionDenied | `from foundry.v2.datasets.errors import CreateTransactionPermissionDenied` | +**Datasets** | DatasetNotFound | `from foundry.v2.datasets.errors import DatasetNotFound` | +**Datasets** | DatasetReadNotSupported | `from foundry.v2.datasets.errors import DatasetReadNotSupported` | +**Datasets** | DeleteBranchPermissionDenied | `from foundry.v2.datasets.errors import DeleteBranchPermissionDenied` | +**Datasets** | DeleteFilePermissionDenied | `from foundry.v2.datasets.errors import DeleteFilePermissionDenied` | +**Datasets** | DeleteSchemaPermissionDenied | `from foundry.v2.datasets.errors import DeleteSchemaPermissionDenied` | +**Datasets** | FileAlreadyExists | `from foundry.v2.datasets.errors import FileAlreadyExists` | +**Datasets** | FileNotFound | `from foundry.v2.datasets.errors import FileNotFound` | +**Datasets** | FileNotFoundOnBranch | `from foundry.v2.datasets.errors import FileNotFoundOnBranch` | +**Datasets** | FileNotFoundOnTransactionRange | `from foundry.v2.datasets.errors import FileNotFoundOnTransactionRange` | +**Datasets** | GetFileContentPermissionDenied | `from foundry.v2.datasets.errors import GetFileContentPermissionDenied` | +**Datasets** | InvalidBranchName | `from foundry.v2.datasets.errors import InvalidBranchName` | +**Datasets** | InvalidTransactionType | `from foundry.v2.datasets.errors import InvalidTransactionType` | +**Datasets** | OpenTransactionAlreadyExists | `from foundry.v2.datasets.errors import OpenTransactionAlreadyExists` | +**Datasets** | PutSchemaPermissionDenied | `from foundry.v2.datasets.errors import PutSchemaPermissionDenied` | +**Datasets** | ReadTableDatasetPermissionDenied | `from foundry.v2.datasets.errors import ReadTableDatasetPermissionDenied` | +**Datasets** | ReadTableError | `from foundry.v2.datasets.errors import ReadTableError` | +**Datasets** | ReadTableRowLimitExceeded | `from foundry.v2.datasets.errors import ReadTableRowLimitExceeded` | +**Datasets** | ReadTableTimeout | `from foundry.v2.datasets.errors import ReadTableTimeout` | +**Datasets** | SchemaNotFound | `from foundry.v2.datasets.errors import SchemaNotFound` | +**Datasets** | TransactionNotCommitted | `from foundry.v2.datasets.errors import TransactionNotCommitted` | +**Datasets** | TransactionNotFound | `from foundry.v2.datasets.errors import TransactionNotFound` | +**Datasets** | TransactionNotOpen | `from foundry.v2.datasets.errors import TransactionNotOpen` | +**Datasets** | UploadFilePermissionDenied | `from foundry.v2.datasets.errors import UploadFilePermissionDenied` | +**Filesystem** | AddGroupToParentGroupPermissionDenied | `from foundry.v2.filesystem.errors import AddGroupToParentGroupPermissionDenied` | +**Filesystem** | AddMarkingsPermissionDenied | `from foundry.v2.filesystem.errors import AddMarkingsPermissionDenied` | +**Filesystem** | AddOrganizationsPermissionDenied | `from foundry.v2.filesystem.errors import AddOrganizationsPermissionDenied` | +**Filesystem** | AddResourceRolesPermissionDenied | `from foundry.v2.filesystem.errors import AddResourceRolesPermissionDenied` | +**Filesystem** | CreateFolderOutsideProjectNotSupported | `from foundry.v2.filesystem.errors import CreateFolderOutsideProjectNotSupported` | +**Filesystem** | CreateFolderPermissionDenied | `from foundry.v2.filesystem.errors import CreateFolderPermissionDenied` | +**Filesystem** | CreateGroupPermissionDenied | `from foundry.v2.filesystem.errors import CreateGroupPermissionDenied` | +**Filesystem** | CreateProjectFromTemplatePermissionDenied | `from foundry.v2.filesystem.errors import CreateProjectFromTemplatePermissionDenied` | +**Filesystem** | CreateProjectNoOwnerLikeRoleGrant | `from foundry.v2.filesystem.errors import CreateProjectNoOwnerLikeRoleGrant` | +**Filesystem** | CreateProjectPermissionDenied | `from foundry.v2.filesystem.errors import CreateProjectPermissionDenied` | +**Filesystem** | DefaultRolesNotInSpaceRoleSet | `from foundry.v2.filesystem.errors import DefaultRolesNotInSpaceRoleSet` | +**Filesystem** | DeleteResourcePermissionDenied | `from foundry.v2.filesystem.errors import DeleteResourcePermissionDenied` | +**Filesystem** | FolderNotFound | `from foundry.v2.filesystem.errors import FolderNotFound` | +**Filesystem** | ForbiddenOperationOnAutosavedResource | `from foundry.v2.filesystem.errors import ForbiddenOperationOnAutosavedResource` | +**Filesystem** | ForbiddenOperationOnHiddenResource | `from foundry.v2.filesystem.errors import ForbiddenOperationOnHiddenResource` | +**Filesystem** | GetAccessRequirementsPermissionDenied | `from foundry.v2.filesystem.errors import GetAccessRequirementsPermissionDenied` | +**Filesystem** | GetByPathPermissionDenied | `from foundry.v2.filesystem.errors import GetByPathPermissionDenied` | +**Filesystem** | GetRootFolderNotSupported | `from foundry.v2.filesystem.errors import GetRootFolderNotSupported` | +**Filesystem** | GetSpaceResourceNotSupported | `from foundry.v2.filesystem.errors import GetSpaceResourceNotSupported` | +**Filesystem** | InvalidDefaultRoles | `from foundry.v2.filesystem.errors import InvalidDefaultRoles` | +**Filesystem** | InvalidDescription | `from foundry.v2.filesystem.errors import InvalidDescription` | +**Filesystem** | InvalidDisplayName | `from foundry.v2.filesystem.errors import InvalidDisplayName` | +**Filesystem** | InvalidFolder | `from foundry.v2.filesystem.errors import InvalidFolder` | +**Filesystem** | InvalidOrganizationHierarchy | `from foundry.v2.filesystem.errors import InvalidOrganizationHierarchy` | +**Filesystem** | InvalidOrganizations | `from foundry.v2.filesystem.errors import InvalidOrganizations` | +**Filesystem** | InvalidPath | `from foundry.v2.filesystem.errors import InvalidPath` | +**Filesystem** | InvalidPrincipalIdsForGroupTemplate | `from foundry.v2.filesystem.errors import InvalidPrincipalIdsForGroupTemplate` | +**Filesystem** | InvalidRoleIds | `from foundry.v2.filesystem.errors import InvalidRoleIds` | +**Filesystem** | InvalidVariable | `from foundry.v2.filesystem.errors import InvalidVariable` | +**Filesystem** | InvalidVariableEnumOption | `from foundry.v2.filesystem.errors import InvalidVariableEnumOption` | +**Filesystem** | MarkingNotFound | `from foundry.v2.filesystem.errors import MarkingNotFound` | +**Filesystem** | MissingDisplayName | `from foundry.v2.filesystem.errors import MissingDisplayName` | +**Filesystem** | MissingVariableValue | `from foundry.v2.filesystem.errors import MissingVariableValue` | +**Filesystem** | NotAuthorizedToApplyOrganization | `from foundry.v2.filesystem.errors import NotAuthorizedToApplyOrganization` | +**Filesystem** | OrganizationMarkingNotOnSpace | `from foundry.v2.filesystem.errors import OrganizationMarkingNotOnSpace` | +**Filesystem** | OrganizationMarkingNotSupported | `from foundry.v2.filesystem.errors import OrganizationMarkingNotSupported` | +**Filesystem** | OrganizationsNotFound | `from foundry.v2.filesystem.errors import OrganizationsNotFound` | +**Filesystem** | PathNotFound | `from foundry.v2.filesystem.errors import PathNotFound` | +**Filesystem** | PermanentlyDeleteResourcePermissionDenied | `from foundry.v2.filesystem.errors import PermanentlyDeleteResourcePermissionDenied` | +**Filesystem** | ProjectCreationNotSupported | `from foundry.v2.filesystem.errors import ProjectCreationNotSupported` | +**Filesystem** | ProjectNameAlreadyExists | `from foundry.v2.filesystem.errors import ProjectNameAlreadyExists` | +**Filesystem** | ProjectNotFound | `from foundry.v2.filesystem.errors import ProjectNotFound` | +**Filesystem** | ProjectTemplateNotFound | `from foundry.v2.filesystem.errors import ProjectTemplateNotFound` | +**Filesystem** | RemoveMarkingsPermissionDenied | `from foundry.v2.filesystem.errors import RemoveMarkingsPermissionDenied` | +**Filesystem** | RemoveOrganizationsPermissionDenied | `from foundry.v2.filesystem.errors import RemoveOrganizationsPermissionDenied` | +**Filesystem** | RemoveResourceRolesPermissionDenied | `from foundry.v2.filesystem.errors import RemoveResourceRolesPermissionDenied` | +**Filesystem** | ResourceNameAlreadyExists | `from foundry.v2.filesystem.errors import ResourceNameAlreadyExists` | +**Filesystem** | ResourceNotDirectlyTrashed | `from foundry.v2.filesystem.errors import ResourceNotDirectlyTrashed` | +**Filesystem** | ResourceNotFound | `from foundry.v2.filesystem.errors import ResourceNotFound` | +**Filesystem** | ResourceNotTrashed | `from foundry.v2.filesystem.errors import ResourceNotTrashed` | +**Filesystem** | RestoreResourcePermissionDenied | `from foundry.v2.filesystem.errors import RestoreResourcePermissionDenied` | +**Filesystem** | SpaceNotFound | `from foundry.v2.filesystem.errors import SpaceNotFound` | +**Filesystem** | TemplateGroupNameConflict | `from foundry.v2.filesystem.errors import TemplateGroupNameConflict` | +**Filesystem** | TemplateMarkingNameConflict | `from foundry.v2.filesystem.errors import TemplateMarkingNameConflict` | +**Filesystem** | TrashingAutosavedResourcesNotSupported | `from foundry.v2.filesystem.errors import TrashingAutosavedResourcesNotSupported` | +**Filesystem** | TrashingHiddenResourcesNotSupported | `from foundry.v2.filesystem.errors import TrashingHiddenResourcesNotSupported` | +**Filesystem** | TrashingSpaceNotSupported | `from foundry.v2.filesystem.errors import TrashingSpaceNotSupported` | +**Functions** | ExecuteQueryPermissionDenied | `from foundry.v2.functions.errors import ExecuteQueryPermissionDenied` | +**Functions** | GetByRidQueriesPermissionDenied | `from foundry.v2.functions.errors import GetByRidQueriesPermissionDenied` | +**Functions** | InvalidQueryParameterValue | `from foundry.v2.functions.errors import InvalidQueryParameterValue` | +**Functions** | MissingParameter | `from foundry.v2.functions.errors import MissingParameter` | +**Functions** | QueryEncounteredUserFacingError | `from foundry.v2.functions.errors import QueryEncounteredUserFacingError` | +**Functions** | QueryMemoryExceededLimit | `from foundry.v2.functions.errors import QueryMemoryExceededLimit` | +**Functions** | QueryNotFound | `from foundry.v2.functions.errors import QueryNotFound` | +**Functions** | QueryRuntimeError | `from foundry.v2.functions.errors import QueryRuntimeError` | +**Functions** | QueryTimeExceededLimit | `from foundry.v2.functions.errors import QueryTimeExceededLimit` | +**Functions** | UnknownParameter | `from foundry.v2.functions.errors import UnknownParameter` | +**Functions** | ValueTypeNotFound | `from foundry.v2.functions.errors import ValueTypeNotFound` | +**Functions** | VersionIdNotFound | `from foundry.v2.functions.errors import VersionIdNotFound` | +**MediaSets** | ConflictingMediaSetIdentifiers | `from foundry.v2.media_sets.errors import ConflictingMediaSetIdentifiers` | +**MediaSets** | MediaItemNotFound | `from foundry.v2.media_sets.errors import MediaItemNotFound` | +**Ontologies** | ActionContainsDuplicateEdits | `from foundry.v2.ontologies.errors import ActionContainsDuplicateEdits` | +**Ontologies** | ActionEditedPropertiesNotFound | `from foundry.v2.ontologies.errors import ActionEditedPropertiesNotFound` | +**Ontologies** | ActionEditsReadOnlyEntity | `from foundry.v2.ontologies.errors import ActionEditsReadOnlyEntity` | +**Ontologies** | ActionNotFound | `from foundry.v2.ontologies.errors import ActionNotFound` | +**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry.v2.ontologies.errors import ActionParameterInterfaceTypeNotFound` | +**Ontologies** | ActionParameterObjectNotFound | `from foundry.v2.ontologies.errors import ActionParameterObjectNotFound` | +**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry.v2.ontologies.errors import ActionParameterObjectTypeNotFound` | +**Ontologies** | ActionTypeNotFound | `from foundry.v2.ontologies.errors import ActionTypeNotFound` | +**Ontologies** | ActionValidationFailed | `from foundry.v2.ontologies.errors import ActionValidationFailed` | +**Ontologies** | AggregationGroupCountExceededLimit | `from foundry.v2.ontologies.errors import AggregationGroupCountExceededLimit` | +**Ontologies** | AggregationMemoryExceededLimit | `from foundry.v2.ontologies.errors import AggregationMemoryExceededLimit` | +**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry.v2.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | +**Ontologies** | ApplyActionFailed | `from foundry.v2.ontologies.errors import ApplyActionFailed` | +**Ontologies** | AttachmentNotFound | `from foundry.v2.ontologies.errors import AttachmentNotFound` | +**Ontologies** | AttachmentSizeExceededLimit | `from foundry.v2.ontologies.errors import AttachmentSizeExceededLimit` | +**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry.v2.ontologies.errors import CompositePrimaryKeyNotSupported` | +**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry.v2.ontologies.errors import DerivedPropertyApiNamesNotUnique` | +**Ontologies** | DuplicateOrderBy | `from foundry.v2.ontologies.errors import DuplicateOrderBy` | +**Ontologies** | EditObjectPermissionDenied | `from foundry.v2.ontologies.errors import EditObjectPermissionDenied` | +**Ontologies** | FunctionEncounteredUserFacingError | `from foundry.v2.ontologies.errors import FunctionEncounteredUserFacingError` | +**Ontologies** | FunctionExecutionFailed | `from foundry.v2.ontologies.errors import FunctionExecutionFailed` | +**Ontologies** | FunctionExecutionTimedOut | `from foundry.v2.ontologies.errors import FunctionExecutionTimedOut` | +**Ontologies** | FunctionInvalidInput | `from foundry.v2.ontologies.errors import FunctionInvalidInput` | +**Ontologies** | InterfaceTypeNotFound | `from foundry.v2.ontologies.errors import InterfaceTypeNotFound` | +**Ontologies** | InterfaceTypesNotFound | `from foundry.v2.ontologies.errors import InterfaceTypesNotFound` | +**Ontologies** | InvalidAggregationOrdering | `from foundry.v2.ontologies.errors import InvalidAggregationOrdering` | +**Ontologies** | InvalidAggregationRange | `from foundry.v2.ontologies.errors import InvalidAggregationRange` | +**Ontologies** | InvalidAggregationRangePropertyType | `from foundry.v2.ontologies.errors import InvalidAggregationRangePropertyType` | +**Ontologies** | InvalidAggregationRangeValue | `from foundry.v2.ontologies.errors import InvalidAggregationRangeValue` | +**Ontologies** | InvalidApplyActionOptionCombination | `from foundry.v2.ontologies.errors import InvalidApplyActionOptionCombination` | +**Ontologies** | InvalidContentLength | `from foundry.v2.ontologies.errors import InvalidContentLength` | +**Ontologies** | InvalidContentType | `from foundry.v2.ontologies.errors import InvalidContentType` | +**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry.v2.ontologies.errors import InvalidDurationGroupByPropertyType` | +**Ontologies** | InvalidDurationGroupByValue | `from foundry.v2.ontologies.errors import InvalidDurationGroupByValue` | +**Ontologies** | InvalidFields | `from foundry.v2.ontologies.errors import InvalidFields` | +**Ontologies** | InvalidGroupId | `from foundry.v2.ontologies.errors import InvalidGroupId` | +**Ontologies** | InvalidOrderType | `from foundry.v2.ontologies.errors import InvalidOrderType` | +**Ontologies** | InvalidParameterValue | `from foundry.v2.ontologies.errors import InvalidParameterValue` | +**Ontologies** | InvalidPropertyFiltersCombination | `from foundry.v2.ontologies.errors import InvalidPropertyFiltersCombination` | +**Ontologies** | InvalidPropertyFilterValue | `from foundry.v2.ontologies.errors import InvalidPropertyFilterValue` | +**Ontologies** | InvalidPropertyType | `from foundry.v2.ontologies.errors import InvalidPropertyType` | +**Ontologies** | InvalidPropertyValue | `from foundry.v2.ontologies.errors import InvalidPropertyValue` | +**Ontologies** | InvalidQueryParameterValue | `from foundry.v2.ontologies.errors import InvalidQueryParameterValue` | +**Ontologies** | InvalidRangeQuery | `from foundry.v2.ontologies.errors import InvalidRangeQuery` | +**Ontologies** | InvalidSortOrder | `from foundry.v2.ontologies.errors import InvalidSortOrder` | +**Ontologies** | InvalidSortType | `from foundry.v2.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidUserId | `from foundry.v2.ontologies.errors import InvalidUserId` | +**Ontologies** | LinkAlreadyExists | `from foundry.v2.ontologies.errors import LinkAlreadyExists` | +**Ontologies** | LinkedObjectNotFound | `from foundry.v2.ontologies.errors import LinkedObjectNotFound` | +**Ontologies** | LinkTypeNotFound | `from foundry.v2.ontologies.errors import LinkTypeNotFound` | +**Ontologies** | MalformedPropertyFilters | `from foundry.v2.ontologies.errors import MalformedPropertyFilters` | +**Ontologies** | MarketplaceActionMappingNotFound | `from foundry.v2.ontologies.errors import MarketplaceActionMappingNotFound` | +**Ontologies** | MarketplaceInstallationNotFound | `from foundry.v2.ontologies.errors import MarketplaceInstallationNotFound` | +**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry.v2.ontologies.errors import MarketplaceLinkMappingNotFound` | +**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry.v2.ontologies.errors import MarketplaceObjectMappingNotFound` | +**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry.v2.ontologies.errors import MarketplaceQueryMappingNotFound` | +**Ontologies** | MissingParameter | `from foundry.v2.ontologies.errors import MissingParameter` | +**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry.v2.ontologies.errors import MultipleGroupByOnFieldNotSupported` | +**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry.v2.ontologies.errors import MultiplePropertyValuesNotSupported` | +**Ontologies** | ObjectAlreadyExists | `from foundry.v2.ontologies.errors import ObjectAlreadyExists` | +**Ontologies** | ObjectChanged | `from foundry.v2.ontologies.errors import ObjectChanged` | +**Ontologies** | ObjectNotFound | `from foundry.v2.ontologies.errors import ObjectNotFound` | +**Ontologies** | ObjectSetNotFound | `from foundry.v2.ontologies.errors import ObjectSetNotFound` | +**Ontologies** | ObjectsExceededLimit | `from foundry.v2.ontologies.errors import ObjectsExceededLimit` | +**Ontologies** | ObjectTypeNotFound | `from foundry.v2.ontologies.errors import ObjectTypeNotFound` | +**Ontologies** | ObjectTypeNotSynced | `from foundry.v2.ontologies.errors import ObjectTypeNotSynced` | +**Ontologies** | ObjectTypesNotSynced | `from foundry.v2.ontologies.errors import ObjectTypesNotSynced` | +**Ontologies** | OntologyApiNameNotUnique | `from foundry.v2.ontologies.errors import OntologyApiNameNotUnique` | +**Ontologies** | OntologyEditsExceededLimit | `from foundry.v2.ontologies.errors import OntologyEditsExceededLimit` | +**Ontologies** | OntologyNotFound | `from foundry.v2.ontologies.errors import OntologyNotFound` | +**Ontologies** | OntologySyncing | `from foundry.v2.ontologies.errors import OntologySyncing` | +**Ontologies** | OntologySyncingObjectTypes | `from foundry.v2.ontologies.errors import OntologySyncingObjectTypes` | +**Ontologies** | ParameterObjectNotFound | `from foundry.v2.ontologies.errors import ParameterObjectNotFound` | +**Ontologies** | ParameterObjectSetRidNotFound | `from foundry.v2.ontologies.errors import ParameterObjectSetRidNotFound` | +**Ontologies** | ParametersNotFound | `from foundry.v2.ontologies.errors import ParametersNotFound` | +**Ontologies** | ParameterTypeNotSupported | `from foundry.v2.ontologies.errors import ParameterTypeNotSupported` | +**Ontologies** | ParentAttachmentPermissionDenied | `from foundry.v2.ontologies.errors import ParentAttachmentPermissionDenied` | +**Ontologies** | PropertiesHaveDifferentIds | `from foundry.v2.ontologies.errors import PropertiesHaveDifferentIds` | +**Ontologies** | PropertiesNotFilterable | `from foundry.v2.ontologies.errors import PropertiesNotFilterable` | +**Ontologies** | PropertiesNotFound | `from foundry.v2.ontologies.errors import PropertiesNotFound` | +**Ontologies** | PropertiesNotSearchable | `from foundry.v2.ontologies.errors import PropertiesNotSearchable` | +**Ontologies** | PropertiesNotSortable | `from foundry.v2.ontologies.errors import PropertiesNotSortable` | +**Ontologies** | PropertyApiNameNotFound | `from foundry.v2.ontologies.errors import PropertyApiNameNotFound` | +**Ontologies** | PropertyBaseTypeNotSupported | `from foundry.v2.ontologies.errors import PropertyBaseTypeNotSupported` | +**Ontologies** | PropertyFiltersNotSupported | `from foundry.v2.ontologies.errors import PropertyFiltersNotSupported` | +**Ontologies** | PropertyNotFound | `from foundry.v2.ontologies.errors import PropertyNotFound` | +**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry.v2.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | +**Ontologies** | PropertyTypeNotFound | `from foundry.v2.ontologies.errors import PropertyTypeNotFound` | +**Ontologies** | PropertyTypesSearchNotSupported | `from foundry.v2.ontologies.errors import PropertyTypesSearchNotSupported` | +**Ontologies** | QueryEncounteredUserFacingError | `from foundry.v2.ontologies.errors import QueryEncounteredUserFacingError` | +**Ontologies** | QueryMemoryExceededLimit | `from foundry.v2.ontologies.errors import QueryMemoryExceededLimit` | +**Ontologies** | QueryNotFound | `from foundry.v2.ontologies.errors import QueryNotFound` | +**Ontologies** | QueryRuntimeError | `from foundry.v2.ontologies.errors import QueryRuntimeError` | +**Ontologies** | QueryTimeExceededLimit | `from foundry.v2.ontologies.errors import QueryTimeExceededLimit` | +**Ontologies** | SearchVectorDimensionsDiffer | `from foundry.v2.ontologies.errors import SearchVectorDimensionsDiffer` | +**Ontologies** | SharedPropertiesNotFound | `from foundry.v2.ontologies.errors import SharedPropertiesNotFound` | +**Ontologies** | SharedPropertyTypeNotFound | `from foundry.v2.ontologies.errors import SharedPropertyTypeNotFound` | +**Ontologies** | TooManyNearestNeighborsRequested | `from foundry.v2.ontologies.errors import TooManyNearestNeighborsRequested` | +**Ontologies** | UnknownParameter | `from foundry.v2.ontologies.errors import UnknownParameter` | +**Ontologies** | UnsupportedObjectSet | `from foundry.v2.ontologies.errors import UnsupportedObjectSet` | +**Ontologies** | ViewObjectPermissionDenied | `from foundry.v2.ontologies.errors import ViewObjectPermissionDenied` | +**Orchestration** | BuildInputsNotFound | `from foundry.v2.orchestration.errors import BuildInputsNotFound` | +**Orchestration** | BuildInputsPermissionDenied | `from foundry.v2.orchestration.errors import BuildInputsPermissionDenied` | +**Orchestration** | BuildNotFound | `from foundry.v2.orchestration.errors import BuildNotFound` | +**Orchestration** | BuildTargetsMissingJobSpecs | `from foundry.v2.orchestration.errors import BuildTargetsMissingJobSpecs` | +**Orchestration** | BuildTargetsNotFound | `from foundry.v2.orchestration.errors import BuildTargetsNotFound` | +**Orchestration** | BuildTargetsPermissionDenied | `from foundry.v2.orchestration.errors import BuildTargetsPermissionDenied` | +**Orchestration** | BuildTargetsResolutionError | `from foundry.v2.orchestration.errors import BuildTargetsResolutionError` | +**Orchestration** | CancelBuildPermissionDenied | `from foundry.v2.orchestration.errors import CancelBuildPermissionDenied` | +**Orchestration** | CreateBuildsPermissionDenied | `from foundry.v2.orchestration.errors import CreateBuildsPermissionDenied` | +**Orchestration** | CreateSchedulePermissionDenied | `from foundry.v2.orchestration.errors import CreateSchedulePermissionDenied` | +**Orchestration** | DeleteSchedulePermissionDenied | `from foundry.v2.orchestration.errors import DeleteSchedulePermissionDenied` | +**Orchestration** | InvalidAndTrigger | `from foundry.v2.orchestration.errors import InvalidAndTrigger` | +**Orchestration** | InvalidMediaSetTrigger | `from foundry.v2.orchestration.errors import InvalidMediaSetTrigger` | +**Orchestration** | InvalidOrTrigger | `from foundry.v2.orchestration.errors import InvalidOrTrigger` | +**Orchestration** | InvalidScheduleDescription | `from foundry.v2.orchestration.errors import InvalidScheduleDescription` | +**Orchestration** | InvalidScheduleName | `from foundry.v2.orchestration.errors import InvalidScheduleName` | +**Orchestration** | InvalidTimeTrigger | `from foundry.v2.orchestration.errors import InvalidTimeTrigger` | +**Orchestration** | JobNotFound | `from foundry.v2.orchestration.errors import JobNotFound` | +**Orchestration** | MissingBuildTargets | `from foundry.v2.orchestration.errors import MissingBuildTargets` | +**Orchestration** | MissingConnectingBuildInputs | `from foundry.v2.orchestration.errors import MissingConnectingBuildInputs` | +**Orchestration** | MissingTrigger | `from foundry.v2.orchestration.errors import MissingTrigger` | +**Orchestration** | PauseSchedulePermissionDenied | `from foundry.v2.orchestration.errors import PauseSchedulePermissionDenied` | +**Orchestration** | ReplaceSchedulePermissionDenied | `from foundry.v2.orchestration.errors import ReplaceSchedulePermissionDenied` | +**Orchestration** | RunSchedulePermissionDenied | `from foundry.v2.orchestration.errors import RunSchedulePermissionDenied` | +**Orchestration** | ScheduleNotFound | `from foundry.v2.orchestration.errors import ScheduleNotFound` | +**Orchestration** | ScheduleTriggerResourcesNotFound | `from foundry.v2.orchestration.errors import ScheduleTriggerResourcesNotFound` | +**Orchestration** | ScheduleTriggerResourcesPermissionDenied | `from foundry.v2.orchestration.errors import ScheduleTriggerResourcesPermissionDenied` | +**Orchestration** | ScheduleVersionNotFound | `from foundry.v2.orchestration.errors import ScheduleVersionNotFound` | +**Orchestration** | SearchBuildsPermissionDenied | `from foundry.v2.orchestration.errors import SearchBuildsPermissionDenied` | +**Orchestration** | TargetNotSupported | `from foundry.v2.orchestration.errors import TargetNotSupported` | +**Orchestration** | UnpauseSchedulePermissionDenied | `from foundry.v2.orchestration.errors import UnpauseSchedulePermissionDenied` | +**Streams** | CannotCreateStreamingDatasetInUserFolder | `from foundry.v2.streams.errors import CannotCreateStreamingDatasetInUserFolder` | +**Streams** | CannotWriteToTrashedStream | `from foundry.v2.streams.errors import CannotWriteToTrashedStream` | +**Streams** | CreateStreamingDatasetPermissionDenied | `from foundry.v2.streams.errors import CreateStreamingDatasetPermissionDenied` | +**Streams** | CreateStreamPermissionDenied | `from foundry.v2.streams.errors import CreateStreamPermissionDenied` | +**Streams** | FailedToProcessBinaryRecord | `from foundry.v2.streams.errors import FailedToProcessBinaryRecord` | +**Streams** | InvalidStreamNoSchema | `from foundry.v2.streams.errors import InvalidStreamNoSchema` | +**Streams** | InvalidStreamType | `from foundry.v2.streams.errors import InvalidStreamType` | +**Streams** | PublishBinaryRecordToStreamPermissionDenied | `from foundry.v2.streams.errors import PublishBinaryRecordToStreamPermissionDenied` | +**Streams** | PublishRecordsToStreamPermissionDenied | `from foundry.v2.streams.errors import PublishRecordsToStreamPermissionDenied` | +**Streams** | PublishRecordToStreamPermissionDenied | `from foundry.v2.streams.errors import PublishRecordToStreamPermissionDenied` | +**Streams** | RecordDoesNotMatchStreamSchema | `from foundry.v2.streams.errors import RecordDoesNotMatchStreamSchema` | +**Streams** | RecordTooLarge | `from foundry.v2.streams.errors import RecordTooLarge` | +**Streams** | ResetStreamPermissionDenied | `from foundry.v2.streams.errors import ResetStreamPermissionDenied` | +**Streams** | StreamNotFound | `from foundry.v2.streams.errors import StreamNotFound` | +**Streams** | ViewNotFound | `from foundry.v2.streams.errors import ViewNotFound` | +**ThirdPartyApplications** | CannotDeleteDeployedVersion | `from foundry.v2.third_party_applications.errors import CannotDeleteDeployedVersion` | +**ThirdPartyApplications** | DeleteVersionPermissionDenied | `from foundry.v2.third_party_applications.errors import DeleteVersionPermissionDenied` | +**ThirdPartyApplications** | DeployWebsitePermissionDenied | `from foundry.v2.third_party_applications.errors import DeployWebsitePermissionDenied` | +**ThirdPartyApplications** | FileCountLimitExceeded | `from foundry.v2.third_party_applications.errors import FileCountLimitExceeded` | +**ThirdPartyApplications** | FileSizeLimitExceeded | `from foundry.v2.third_party_applications.errors import FileSizeLimitExceeded` | +**ThirdPartyApplications** | InvalidVersion | `from foundry.v2.third_party_applications.errors import InvalidVersion` | +**ThirdPartyApplications** | ThirdPartyApplicationNotFound | `from foundry.v2.third_party_applications.errors import ThirdPartyApplicationNotFound` | +**ThirdPartyApplications** | UndeployWebsitePermissionDenied | `from foundry.v2.third_party_applications.errors import UndeployWebsitePermissionDenied` | +**ThirdPartyApplications** | UploadSnapshotVersionPermissionDenied | `from foundry.v2.third_party_applications.errors import UploadSnapshotVersionPermissionDenied` | +**ThirdPartyApplications** | UploadVersionPermissionDenied | `from foundry.v2.third_party_applications.errors import UploadVersionPermissionDenied` | +**ThirdPartyApplications** | VersionAlreadyExists | `from foundry.v2.third_party_applications.errors import VersionAlreadyExists` | +**ThirdPartyApplications** | VersionLimitExceeded | `from foundry.v2.third_party_applications.errors import VersionLimitExceeded` | +**ThirdPartyApplications** | VersionNotFound | `from foundry.v2.third_party_applications.errors import VersionNotFound` | +**ThirdPartyApplications** | WebsiteNotFound | `from foundry.v2.third_party_applications.errors import WebsiteNotFound` | + +## Documentation for V1 errors + +Namespace | Name | Import | +--------- | ---- | ------ | +**Core** | ApiFeaturePreviewUsageOnly | `from foundry.v1.core.errors import ApiFeaturePreviewUsageOnly` | +**Core** | ApiUsageDenied | `from foundry.v1.core.errors import ApiUsageDenied` | +**Core** | FolderNotFound | `from foundry.v1.core.errors import FolderNotFound` | +**Core** | InvalidPageSize | `from foundry.v1.core.errors import InvalidPageSize` | +**Core** | InvalidPageToken | `from foundry.v1.core.errors import InvalidPageToken` | +**Core** | InvalidParameterCombination | `from foundry.v1.core.errors import InvalidParameterCombination` | +**Core** | MissingPostBody | `from foundry.v1.core.errors import MissingPostBody` | +**Core** | ResourceNameAlreadyExists | `from foundry.v1.core.errors import ResourceNameAlreadyExists` | +**Core** | UnknownDistanceUnit | `from foundry.v1.core.errors import UnknownDistanceUnit` | +**Datasets** | AbortTransactionPermissionDenied | `from foundry.v1.datasets.errors import AbortTransactionPermissionDenied` | +**Datasets** | BranchAlreadyExists | `from foundry.v1.datasets.errors import BranchAlreadyExists` | +**Datasets** | BranchNotFound | `from foundry.v1.datasets.errors import BranchNotFound` | +**Datasets** | ColumnTypesNotSupported | `from foundry.v1.datasets.errors import ColumnTypesNotSupported` | +**Datasets** | CommitTransactionPermissionDenied | `from foundry.v1.datasets.errors import CommitTransactionPermissionDenied` | +**Datasets** | CreateBranchPermissionDenied | `from foundry.v1.datasets.errors import CreateBranchPermissionDenied` | +**Datasets** | CreateDatasetPermissionDenied | `from foundry.v1.datasets.errors import CreateDatasetPermissionDenied` | +**Datasets** | CreateTransactionPermissionDenied | `from foundry.v1.datasets.errors import CreateTransactionPermissionDenied` | +**Datasets** | DatasetNotFound | `from foundry.v1.datasets.errors import DatasetNotFound` | +**Datasets** | DatasetReadNotSupported | `from foundry.v1.datasets.errors import DatasetReadNotSupported` | +**Datasets** | DeleteBranchPermissionDenied | `from foundry.v1.datasets.errors import DeleteBranchPermissionDenied` | +**Datasets** | DeleteSchemaPermissionDenied | `from foundry.v1.datasets.errors import DeleteSchemaPermissionDenied` | +**Datasets** | FileAlreadyExists | `from foundry.v1.datasets.errors import FileAlreadyExists` | +**Datasets** | FileNotFoundOnBranch | `from foundry.v1.datasets.errors import FileNotFoundOnBranch` | +**Datasets** | FileNotFoundOnTransactionRange | `from foundry.v1.datasets.errors import FileNotFoundOnTransactionRange` | +**Datasets** | InvalidBranchId | `from foundry.v1.datasets.errors import InvalidBranchId` | +**Datasets** | InvalidTransactionType | `from foundry.v1.datasets.errors import InvalidTransactionType` | +**Datasets** | OpenTransactionAlreadyExists | `from foundry.v1.datasets.errors import OpenTransactionAlreadyExists` | +**Datasets** | PutSchemaPermissionDenied | `from foundry.v1.datasets.errors import PutSchemaPermissionDenied` | +**Datasets** | ReadTablePermissionDenied | `from foundry.v1.datasets.errors import ReadTablePermissionDenied` | +**Datasets** | SchemaNotFound | `from foundry.v1.datasets.errors import SchemaNotFound` | +**Datasets** | TransactionNotCommitted | `from foundry.v1.datasets.errors import TransactionNotCommitted` | +**Datasets** | TransactionNotFound | `from foundry.v1.datasets.errors import TransactionNotFound` | +**Datasets** | TransactionNotOpen | `from foundry.v1.datasets.errors import TransactionNotOpen` | +**Datasets** | UploadFilePermissionDenied | `from foundry.v1.datasets.errors import UploadFilePermissionDenied` | +**Ontologies** | ActionContainsDuplicateEdits | `from foundry.v1.ontologies.errors import ActionContainsDuplicateEdits` | +**Ontologies** | ActionEditedPropertiesNotFound | `from foundry.v1.ontologies.errors import ActionEditedPropertiesNotFound` | +**Ontologies** | ActionEditsReadOnlyEntity | `from foundry.v1.ontologies.errors import ActionEditsReadOnlyEntity` | +**Ontologies** | ActionNotFound | `from foundry.v1.ontologies.errors import ActionNotFound` | +**Ontologies** | ActionParameterInterfaceTypeNotFound | `from foundry.v1.ontologies.errors import ActionParameterInterfaceTypeNotFound` | +**Ontologies** | ActionParameterObjectNotFound | `from foundry.v1.ontologies.errors import ActionParameterObjectNotFound` | +**Ontologies** | ActionParameterObjectTypeNotFound | `from foundry.v1.ontologies.errors import ActionParameterObjectTypeNotFound` | +**Ontologies** | ActionTypeNotFound | `from foundry.v1.ontologies.errors import ActionTypeNotFound` | +**Ontologies** | ActionValidationFailed | `from foundry.v1.ontologies.errors import ActionValidationFailed` | +**Ontologies** | AggregationGroupCountExceededLimit | `from foundry.v1.ontologies.errors import AggregationGroupCountExceededLimit` | +**Ontologies** | AggregationMemoryExceededLimit | `from foundry.v1.ontologies.errors import AggregationMemoryExceededLimit` | +**Ontologies** | AggregationNestedObjectSetSizeExceededLimit | `from foundry.v1.ontologies.errors import AggregationNestedObjectSetSizeExceededLimit` | +**Ontologies** | ApplyActionFailed | `from foundry.v1.ontologies.errors import ApplyActionFailed` | +**Ontologies** | AttachmentNotFound | `from foundry.v1.ontologies.errors import AttachmentNotFound` | +**Ontologies** | AttachmentSizeExceededLimit | `from foundry.v1.ontologies.errors import AttachmentSizeExceededLimit` | +**Ontologies** | CompositePrimaryKeyNotSupported | `from foundry.v1.ontologies.errors import CompositePrimaryKeyNotSupported` | +**Ontologies** | DerivedPropertyApiNamesNotUnique | `from foundry.v1.ontologies.errors import DerivedPropertyApiNamesNotUnique` | +**Ontologies** | DuplicateOrderBy | `from foundry.v1.ontologies.errors import DuplicateOrderBy` | +**Ontologies** | EditObjectPermissionDenied | `from foundry.v1.ontologies.errors import EditObjectPermissionDenied` | +**Ontologies** | FunctionEncounteredUserFacingError | `from foundry.v1.ontologies.errors import FunctionEncounteredUserFacingError` | +**Ontologies** | FunctionExecutionFailed | `from foundry.v1.ontologies.errors import FunctionExecutionFailed` | +**Ontologies** | FunctionExecutionTimedOut | `from foundry.v1.ontologies.errors import FunctionExecutionTimedOut` | +**Ontologies** | FunctionInvalidInput | `from foundry.v1.ontologies.errors import FunctionInvalidInput` | +**Ontologies** | InterfaceTypeNotFound | `from foundry.v1.ontologies.errors import InterfaceTypeNotFound` | +**Ontologies** | InterfaceTypesNotFound | `from foundry.v1.ontologies.errors import InterfaceTypesNotFound` | +**Ontologies** | InvalidAggregationOrdering | `from foundry.v1.ontologies.errors import InvalidAggregationOrdering` | +**Ontologies** | InvalidAggregationRange | `from foundry.v1.ontologies.errors import InvalidAggregationRange` | +**Ontologies** | InvalidAggregationRangePropertyType | `from foundry.v1.ontologies.errors import InvalidAggregationRangePropertyType` | +**Ontologies** | InvalidAggregationRangeValue | `from foundry.v1.ontologies.errors import InvalidAggregationRangeValue` | +**Ontologies** | InvalidApplyActionOptionCombination | `from foundry.v1.ontologies.errors import InvalidApplyActionOptionCombination` | +**Ontologies** | InvalidContentLength | `from foundry.v1.ontologies.errors import InvalidContentLength` | +**Ontologies** | InvalidContentType | `from foundry.v1.ontologies.errors import InvalidContentType` | +**Ontologies** | InvalidDurationGroupByPropertyType | `from foundry.v1.ontologies.errors import InvalidDurationGroupByPropertyType` | +**Ontologies** | InvalidDurationGroupByValue | `from foundry.v1.ontologies.errors import InvalidDurationGroupByValue` | +**Ontologies** | InvalidFields | `from foundry.v1.ontologies.errors import InvalidFields` | +**Ontologies** | InvalidGroupId | `from foundry.v1.ontologies.errors import InvalidGroupId` | +**Ontologies** | InvalidOrderType | `from foundry.v1.ontologies.errors import InvalidOrderType` | +**Ontologies** | InvalidParameterValue | `from foundry.v1.ontologies.errors import InvalidParameterValue` | +**Ontologies** | InvalidPropertyFiltersCombination | `from foundry.v1.ontologies.errors import InvalidPropertyFiltersCombination` | +**Ontologies** | InvalidPropertyFilterValue | `from foundry.v1.ontologies.errors import InvalidPropertyFilterValue` | +**Ontologies** | InvalidPropertyType | `from foundry.v1.ontologies.errors import InvalidPropertyType` | +**Ontologies** | InvalidPropertyValue | `from foundry.v1.ontologies.errors import InvalidPropertyValue` | +**Ontologies** | InvalidQueryParameterValue | `from foundry.v1.ontologies.errors import InvalidQueryParameterValue` | +**Ontologies** | InvalidRangeQuery | `from foundry.v1.ontologies.errors import InvalidRangeQuery` | +**Ontologies** | InvalidSortOrder | `from foundry.v1.ontologies.errors import InvalidSortOrder` | +**Ontologies** | InvalidSortType | `from foundry.v1.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidUserId | `from foundry.v1.ontologies.errors import InvalidUserId` | +**Ontologies** | LinkAlreadyExists | `from foundry.v1.ontologies.errors import LinkAlreadyExists` | +**Ontologies** | LinkedObjectNotFound | `from foundry.v1.ontologies.errors import LinkedObjectNotFound` | +**Ontologies** | LinkTypeNotFound | `from foundry.v1.ontologies.errors import LinkTypeNotFound` | +**Ontologies** | MalformedPropertyFilters | `from foundry.v1.ontologies.errors import MalformedPropertyFilters` | +**Ontologies** | MarketplaceActionMappingNotFound | `from foundry.v1.ontologies.errors import MarketplaceActionMappingNotFound` | +**Ontologies** | MarketplaceInstallationNotFound | `from foundry.v1.ontologies.errors import MarketplaceInstallationNotFound` | +**Ontologies** | MarketplaceLinkMappingNotFound | `from foundry.v1.ontologies.errors import MarketplaceLinkMappingNotFound` | +**Ontologies** | MarketplaceObjectMappingNotFound | `from foundry.v1.ontologies.errors import MarketplaceObjectMappingNotFound` | +**Ontologies** | MarketplaceQueryMappingNotFound | `from foundry.v1.ontologies.errors import MarketplaceQueryMappingNotFound` | +**Ontologies** | MissingParameter | `from foundry.v1.ontologies.errors import MissingParameter` | +**Ontologies** | MultipleGroupByOnFieldNotSupported | `from foundry.v1.ontologies.errors import MultipleGroupByOnFieldNotSupported` | +**Ontologies** | MultiplePropertyValuesNotSupported | `from foundry.v1.ontologies.errors import MultiplePropertyValuesNotSupported` | +**Ontologies** | ObjectAlreadyExists | `from foundry.v1.ontologies.errors import ObjectAlreadyExists` | +**Ontologies** | ObjectChanged | `from foundry.v1.ontologies.errors import ObjectChanged` | +**Ontologies** | ObjectNotFound | `from foundry.v1.ontologies.errors import ObjectNotFound` | +**Ontologies** | ObjectSetNotFound | `from foundry.v1.ontologies.errors import ObjectSetNotFound` | +**Ontologies** | ObjectsExceededLimit | `from foundry.v1.ontologies.errors import ObjectsExceededLimit` | +**Ontologies** | ObjectTypeNotFound | `from foundry.v1.ontologies.errors import ObjectTypeNotFound` | +**Ontologies** | ObjectTypeNotSynced | `from foundry.v1.ontologies.errors import ObjectTypeNotSynced` | +**Ontologies** | ObjectTypesNotSynced | `from foundry.v1.ontologies.errors import ObjectTypesNotSynced` | +**Ontologies** | OntologyApiNameNotUnique | `from foundry.v1.ontologies.errors import OntologyApiNameNotUnique` | +**Ontologies** | OntologyEditsExceededLimit | `from foundry.v1.ontologies.errors import OntologyEditsExceededLimit` | +**Ontologies** | OntologyNotFound | `from foundry.v1.ontologies.errors import OntologyNotFound` | +**Ontologies** | OntologySyncing | `from foundry.v1.ontologies.errors import OntologySyncing` | +**Ontologies** | OntologySyncingObjectTypes | `from foundry.v1.ontologies.errors import OntologySyncingObjectTypes` | +**Ontologies** | ParameterObjectNotFound | `from foundry.v1.ontologies.errors import ParameterObjectNotFound` | +**Ontologies** | ParameterObjectSetRidNotFound | `from foundry.v1.ontologies.errors import ParameterObjectSetRidNotFound` | +**Ontologies** | ParametersNotFound | `from foundry.v1.ontologies.errors import ParametersNotFound` | +**Ontologies** | ParameterTypeNotSupported | `from foundry.v1.ontologies.errors import ParameterTypeNotSupported` | +**Ontologies** | ParentAttachmentPermissionDenied | `from foundry.v1.ontologies.errors import ParentAttachmentPermissionDenied` | +**Ontologies** | PropertiesHaveDifferentIds | `from foundry.v1.ontologies.errors import PropertiesHaveDifferentIds` | +**Ontologies** | PropertiesNotFilterable | `from foundry.v1.ontologies.errors import PropertiesNotFilterable` | +**Ontologies** | PropertiesNotFound | `from foundry.v1.ontologies.errors import PropertiesNotFound` | +**Ontologies** | PropertiesNotSearchable | `from foundry.v1.ontologies.errors import PropertiesNotSearchable` | +**Ontologies** | PropertiesNotSortable | `from foundry.v1.ontologies.errors import PropertiesNotSortable` | +**Ontologies** | PropertyApiNameNotFound | `from foundry.v1.ontologies.errors import PropertyApiNameNotFound` | +**Ontologies** | PropertyBaseTypeNotSupported | `from foundry.v1.ontologies.errors import PropertyBaseTypeNotSupported` | +**Ontologies** | PropertyFiltersNotSupported | `from foundry.v1.ontologies.errors import PropertyFiltersNotSupported` | +**Ontologies** | PropertyNotFound | `from foundry.v1.ontologies.errors import PropertyNotFound` | +**Ontologies** | PropertyTypeDoesNotSupportNearestNeighbors | `from foundry.v1.ontologies.errors import PropertyTypeDoesNotSupportNearestNeighbors` | +**Ontologies** | PropertyTypeNotFound | `from foundry.v1.ontologies.errors import PropertyTypeNotFound` | +**Ontologies** | PropertyTypesSearchNotSupported | `from foundry.v1.ontologies.errors import PropertyTypesSearchNotSupported` | +**Ontologies** | QueryEncounteredUserFacingError | `from foundry.v1.ontologies.errors import QueryEncounteredUserFacingError` | +**Ontologies** | QueryMemoryExceededLimit | `from foundry.v1.ontologies.errors import QueryMemoryExceededLimit` | +**Ontologies** | QueryNotFound | `from foundry.v1.ontologies.errors import QueryNotFound` | +**Ontologies** | QueryRuntimeError | `from foundry.v1.ontologies.errors import QueryRuntimeError` | +**Ontologies** | QueryTimeExceededLimit | `from foundry.v1.ontologies.errors import QueryTimeExceededLimit` | +**Ontologies** | SearchVectorDimensionsDiffer | `from foundry.v1.ontologies.errors import SearchVectorDimensionsDiffer` | +**Ontologies** | SharedPropertiesNotFound | `from foundry.v1.ontologies.errors import SharedPropertiesNotFound` | +**Ontologies** | SharedPropertyTypeNotFound | `from foundry.v1.ontologies.errors import SharedPropertyTypeNotFound` | +**Ontologies** | TooManyNearestNeighborsRequested | `from foundry.v1.ontologies.errors import TooManyNearestNeighborsRequested` | +**Ontologies** | UnknownParameter | `from foundry.v1.ontologies.errors import UnknownParameter` | +**Ontologies** | UnsupportedObjectSet | `from foundry.v1.ontologies.errors import UnsupportedObjectSet` | +**Ontologies** | ViewObjectPermissionDenied | `from foundry.v1.ontologies.errors import ViewObjectPermissionDenied` | + + ## Contributions This repository does not accept code contributions. diff --git a/docs/v1/Ontologies/models/DataValue.md b/docs/v1/Ontologies/models/DataValue.md index 03f0a9239..40ed1b7eb 100644 --- a/docs/v1/Ontologies/models/DataValue.md +++ b/docs/v1/Ontologies/models/DataValue.md @@ -10,8 +10,9 @@ Represents the value of data in the following format. Note that these values can | CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | | Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Marking | string | `"MU"` | diff --git a/docs/v1/Ontologies/models/EntrySetTypeDict.md b/docs/v1/Ontologies/models/EntrySetTypeDict.md new file mode 100644 index 000000000..6c4d98d5d --- /dev/null +++ b/docs/v1/Ontologies/models/EntrySetTypeDict.md @@ -0,0 +1,13 @@ +# EntrySetTypeDict + +EntrySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**keyType** | QueryDataTypeDict | Yes | | +**valueType** | QueryDataTypeDict | Yes | | +**type** | Literal["entrySet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md) diff --git a/docs/v1/Ontologies/models/QueryDataTypeDict.md b/docs/v1/Ontologies/models/QueryDataTypeDict.md index d5b5dfaa2..6c29cd0d6 100644 --- a/docs/v1/Ontologies/models/QueryDataTypeDict.md +++ b/docs/v1/Ontologies/models/QueryDataTypeDict.md @@ -14,6 +14,7 @@ DateTypeDict | date QueryStructTypeDict | struct QuerySetTypeDict | set StringTypeDict | string +EntrySetTypeDict | entrySet DoubleTypeDict | double IntegerTypeDict | integer ThreeDimensionalAggregationDict | threeDimensionalAggregation diff --git a/docs/v2/Ontologies/models/DataValue.md b/docs/v2/Ontologies/models/DataValue.md index 7586e4c4c..370ce4f5a 100644 --- a/docs/v2/Ontologies/models/DataValue.md +++ b/docs/v2/Ontologies/models/DataValue.md @@ -10,8 +10,9 @@ Represents the value of data in the following format. Note that these values can | CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | | Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Marking | string | `"MU"` | diff --git a/docs/v2/Ontologies/models/EntrySetType.md b/docs/v2/Ontologies/models/EntrySetType.md new file mode 100644 index 000000000..b472eed4e --- /dev/null +++ b/docs/v2/Ontologies/models/EntrySetType.md @@ -0,0 +1,13 @@ +# EntrySetType + +EntrySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**key_type** | QueryDataType | Yes | | +**value_type** | QueryDataType | Yes | | +**type** | Literal["entrySet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/EntrySetTypeDict.md b/docs/v2/Ontologies/models/EntrySetTypeDict.md new file mode 100644 index 000000000..353e4f74c --- /dev/null +++ b/docs/v2/Ontologies/models/EntrySetTypeDict.md @@ -0,0 +1,13 @@ +# EntrySetTypeDict + +EntrySetType + +## Properties +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +**keyType** | QueryDataTypeDict | Yes | | +**valueType** | QueryDataTypeDict | Yes | | +**type** | Literal["entrySet"] | Yes | None | + + +[[Back to Model list]](../../../../README.md#models-v2-link) [[Back to API list]](../../../../README.md#apis-v2-link) [[Back to README]](../../../../README.md) diff --git a/docs/v2/Ontologies/models/QueryDataType.md b/docs/v2/Ontologies/models/QueryDataType.md index 05db3b88b..dc8a1a535 100644 --- a/docs/v2/Ontologies/models/QueryDataType.md +++ b/docs/v2/Ontologies/models/QueryDataType.md @@ -14,6 +14,7 @@ DateType | date QueryStructType | struct QuerySetType | set StringType | string +EntrySetType | entrySet DoubleType | double IntegerType | integer ThreeDimensionalAggregation | threeDimensionalAggregation diff --git a/docs/v2/Ontologies/models/QueryDataTypeDict.md b/docs/v2/Ontologies/models/QueryDataTypeDict.md index 2df481918..7f48087e5 100644 --- a/docs/v2/Ontologies/models/QueryDataTypeDict.md +++ b/docs/v2/Ontologies/models/QueryDataTypeDict.md @@ -14,6 +14,7 @@ DateTypeDict | date QueryStructTypeDict | struct QuerySetTypeDict | set StringTypeDict | string +EntrySetTypeDict | entrySet DoubleTypeDict | double IntegerTypeDict | integer ThreeDimensionalAggregationDict | threeDimensionalAggregation diff --git a/foundry/__init__.py b/foundry/__init__.py index 99bbd84f0..267ae7bd3 100644 --- a/foundry/__init__.py +++ b/foundry/__init__.py @@ -23,6 +23,7 @@ from foundry._core import StreamingContextManager from foundry._core import UserTokenAuth from foundry._errors import BadRequestError +from foundry._errors import ConflictError from foundry._errors import ConnectionError from foundry._errors import ConnectTimeout from foundry._errors import EnvironmentNotConfigured @@ -35,6 +36,7 @@ from foundry._errors import ProxyError from foundry._errors import RateLimitError from foundry._errors import ReadTimeout +from foundry._errors import RequestEntityTooLargeError from foundry._errors import SDKInternalError from foundry._errors import StreamConsumedError from foundry._errors import TimeoutError @@ -72,6 +74,8 @@ "NotFoundError", "UnprocessableEntityError", "RateLimitError", + "RequestEntityTooLargeError", + "ConflictError", "InternalServerError", "SDKInternalError", "StreamConsumedError", diff --git a/foundry/_core/api_client.py b/foundry/_core/api_client.py index 83d875dae..fae19b06d 100644 --- a/foundry/_core/api_client.py +++ b/foundry/_core/api_client.py @@ -44,6 +44,7 @@ from foundry._core.http_client import HttpClient from foundry._core.resource_iterator import ResourceIterator from foundry._errors import BadRequestError +from foundry._errors import ConflictError from foundry._errors import ConnectionError from foundry._errors import ConnectTimeout from foundry._errors import InternalServerError @@ -53,11 +54,13 @@ from foundry._errors import ProxyError from foundry._errors import RateLimitError from foundry._errors import ReadTimeout +from foundry._errors import RequestEntityTooLargeError from foundry._errors import SDKInternalError from foundry._errors import StreamConsumedError from foundry._errors import UnauthorizedError from foundry._errors import UnprocessableEntityError from foundry._errors import WriteTimeout +from foundry._errors import deserialize_error from foundry._versions import __version__ QueryParameters = Dict[str, Union[Any, List[Any]]] @@ -92,6 +95,7 @@ class RequestInfo: body: Any body_type: Any request_timeout: Optional[int] + throwable_errors: Dict[str, Type[PalantirRPCException]] # DEPRECATED: Remove the streaming details stream: bool = False @@ -114,6 +118,7 @@ def update( body_type=self.body_type, request_timeout=self.request_timeout, stream=stream if stream is not None else self.stream, + throwable_errors=self.throwable_errors, ) @classmethod @@ -130,6 +135,7 @@ def with_defaults( request_timeout: Optional[int] = None, stream: bool = False, chunk_size: Optional[int] = None, + throwable_errors: Dict[str, Type[PalantirRPCException]] = {}, ): return cls( method=method, @@ -143,6 +149,7 @@ def with_defaults( request_timeout=request_timeout, stream=stream, chunk_size=chunk_size, + throwable_errors=throwable_errors, ) @@ -340,7 +347,7 @@ def make_request(token: Token): except httpx.WriteTimeout as e: raise WriteTimeout(str(e)) from e - self._check_for_errors(res) + self._check_for_errors(request_info, res) return ApiResponse(request_info, res) def stream_api(self, request_info: RequestInfo) -> StreamingContextManager[Any]: @@ -387,7 +394,7 @@ def _create_headers(self, request_info: RequestInfo, token: Token) -> Dict[str, }, } - def _check_for_errors(self, res: httpx.Response): + def _check_for_errors(self, req: RequestInfo, res: httpx.Response): if 200 <= res.status_code <= 299: return @@ -396,7 +403,9 @@ def _check_for_errors(self, res: httpx.Response): except json.JSONDecodeError: raise SDKInternalError("Unable to decode JSON error response: " + res.text) - if res.status_code == 400: + if error_instance := deserialize_error(error_json, req.throwable_errors): + raise error_instance + elif res.status_code == 400: raise BadRequestError(error_json) elif res.status_code == 401: raise UnauthorizedError(error_json) @@ -404,6 +413,10 @@ def _check_for_errors(self, res: httpx.Response): raise PermissionDeniedError(error_json) elif res.status_code == 404: raise NotFoundError(error_json) + elif res.status_code == 409: + raise ConflictError(error_json) + elif res.status_code == 413: + raise RequestEntityTooLargeError(error_json) elif res.status_code == 422: raise UnprocessableEntityError(error_json) elif res.status_code == 429: diff --git a/foundry/_errors/__init__.py b/foundry/_errors/__init__.py index 346008ede..85e4feb77 100644 --- a/foundry/_errors/__init__.py +++ b/foundry/_errors/__init__.py @@ -19,11 +19,13 @@ from foundry._errors.not_authenticated import NotAuthenticated from foundry._errors.palantir_exception import PalantirException from foundry._errors.palantir_rpc_exception import BadRequestError +from foundry._errors.palantir_rpc_exception import ConflictError from foundry._errors.palantir_rpc_exception import InternalServerError from foundry._errors.palantir_rpc_exception import NotFoundError from foundry._errors.palantir_rpc_exception import PalantirRPCException from foundry._errors.palantir_rpc_exception import PermissionDeniedError from foundry._errors.palantir_rpc_exception import RateLimitError +from foundry._errors.palantir_rpc_exception import RequestEntityTooLargeError from foundry._errors.palantir_rpc_exception import UnauthorizedError from foundry._errors.palantir_rpc_exception import UnprocessableEntityError from foundry._errors.sdk_internal_error import SDKInternalError @@ -33,3 +35,4 @@ from foundry._errors.timeout_error import ReadTimeout from foundry._errors.timeout_error import TimeoutError from foundry._errors.timeout_error import WriteTimeout +from foundry._errors.utils import deserialize_error diff --git a/foundry/_errors/palantir_rpc_exception.py b/foundry/_errors/palantir_rpc_exception.py index b423da751..eb1d79d50 100644 --- a/foundry/_errors/palantir_rpc_exception.py +++ b/foundry/_errors/palantir_rpc_exception.py @@ -44,6 +44,10 @@ class UnauthorizedError(PalantirRPCException): """ +class RequestEntityTooLargeError(PalantirRPCException): + """The request entity is too large. This error is thrown if a 413 status code is returned.""" + + class PermissionDeniedError(PalantirRPCException): """ You are missing the necessary permissions to complete your request. This error is thrown if a @@ -69,5 +73,12 @@ class RateLimitError(PalantirRPCException): """ +class ConflictError(PalantirRPCException): + """ + There was a conflict with another request. This error is thrown if a 409 status code is + returned. + """ + + class InternalServerError(PalantirRPCException): """An error occurred within the service. This error is thrown if a 5XX status code is returned.""" diff --git a/foundry/_errors/utils.py b/foundry/_errors/utils.py index 4c584b845..c75ae4d5a 100644 --- a/foundry/_errors/utils.py +++ b/foundry/_errors/utils.py @@ -16,6 +16,7 @@ import warnings from typing import Any from typing import Dict +from typing import Optional from typing import Type from typing import cast from typing import get_type_hints @@ -29,31 +30,35 @@ def deserialize_error( error_metadata: Dict[str, Any], exception_classes: Dict[str, type], -): - name = error_metadata["errorName"] - parameters = error_metadata["parameters"] - error_instance_id = error_metadata["errorInstanceId"] +) -> Optional[PalantirRPCException]: + try: + name = error_metadata["errorName"] + parameters = error_metadata["parameters"] + error_instance_id = error_metadata["errorInstanceId"] + except KeyError as e: + warnings.warn(str(SDKInternalError(f"Failed to find required error attributes: {e}"))) + + return None exc_class = exception_classes.get(name) - if exc_class is not None: - annotations = get_type_hints(exc_class) - parameters_type = cast(Type[Dict[str, Any]], annotations["parameters"]) - adapter = pydantic.TypeAdapter(parameters_type) - - try: - parameters_instance = adapter.validate_python(parameters) - return exc_class( - name=name, parameters=parameters_instance, error_instance_id=error_instance_id - ) - except pydantic.ValidationError as e: - # For whatever reason, if we can't properly deserialize the error parameters we will throw PalantirRPCException - # instead of failing - # To provide additional details to the user we will add a bunch of metadata to the warning - # using the "SDKInternalError" class but just emit a warning - warning_message = str( - SDKInternalError(f'Deserialization failed for error "{name}": {e}') - ) - warnings.warn(warning_message) - - # Fallback to PalantirRPCException if no match is found - return PalantirRPCException(error_metadata) + if exc_class is None: + return None + + annotations = get_type_hints(exc_class) + parameters_type = cast(Type[Dict[str, Any]], annotations["parameters"]) + adapter = pydantic.TypeAdapter(parameters_type) + + try: + parameters_instance = adapter.validate_python(parameters) + return exc_class( + name=name, parameters=parameters_instance, error_instance_id=error_instance_id + ) + except pydantic.ValidationError as e: + # For whatever reason, if we can't properly deserialize the error parameters we will throw PalantirRPCException + # instead of failing + # To provide additional details to the user we will add a bunch of metadata to the warning + # using the "SDKInternalError" class but just emit a warning + warning_message = str(SDKInternalError(f'Deserialization failed for error "{name}": {e}')) + + warnings.warn(warning_message) + return None diff --git a/foundry/_versions.py b/foundry/_versions.py index d7af9c48e..6dcd993d4 100644 --- a/foundry/_versions.py +++ b/foundry/_versions.py @@ -17,4 +17,4 @@ # using the autorelease bot __version__ = "0.0.0" -__openapi_document_version__ = "1.1077.0" +__openapi_document_version__ = "1.1080.0" diff --git a/foundry/v1/core/errors/_api_feature_preview_usage_only.py b/foundry/v1/core/errors/_api_feature_preview_usage_only.py index 7637615de..203b63145 100644 --- a/foundry/v1/core/errors/_api_feature_preview_usage_only.py +++ b/foundry/v1/core/errors/_api_feature_preview_usage_only.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ApiFeaturePreviewUsageOnlyParameters(TypedDict): @@ -34,7 +33,7 @@ class ApiFeaturePreviewUsageOnlyParameters(TypedDict): @dataclass -class ApiFeaturePreviewUsageOnly(PalantirRPCException): +class ApiFeaturePreviewUsageOnly(BadRequestError): name: Literal["ApiFeaturePreviewUsageOnly"] parameters: ApiFeaturePreviewUsageOnlyParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_api_usage_denied.py b/foundry/v1/core/errors/_api_usage_denied.py index 0844e4f9f..0c2cf9709 100644 --- a/foundry/v1/core/errors/_api_usage_denied.py +++ b/foundry/v1/core/errors/_api_usage_denied.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.core.models._operation_scope import OperationScope @@ -35,7 +34,7 @@ class ApiUsageDeniedParameters(TypedDict): @dataclass -class ApiUsageDenied(PalantirRPCException): +class ApiUsageDenied(PermissionDeniedError): name: Literal["ApiUsageDenied"] parameters: ApiUsageDeniedParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_folder_not_found.py b/foundry/v1/core/errors/_folder_not_found.py index 235da954c..2db6617e4 100644 --- a/foundry/v1/core/errors/_folder_not_found.py +++ b/foundry/v1/core/errors/_folder_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.core.models._folder_rid import FolderRid @@ -34,7 +33,7 @@ class FolderNotFoundParameters(TypedDict): @dataclass -class FolderNotFound(PalantirRPCException): +class FolderNotFound(NotFoundError): name: Literal["FolderNotFound"] parameters: FolderNotFoundParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_invalid_page_size.py b/foundry/v1/core/errors/_invalid_page_size.py index 0240bdbd2..c40fa5db3 100644 --- a/foundry/v1/core/errors/_invalid_page_size.py +++ b/foundry/v1/core/errors/_invalid_page_size.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.core.models._page_size import PageSize @@ -34,7 +33,7 @@ class InvalidPageSizeParameters(TypedDict): @dataclass -class InvalidPageSize(PalantirRPCException): +class InvalidPageSize(BadRequestError): name: Literal["InvalidPageSize"] parameters: InvalidPageSizeParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_invalid_page_token.py b/foundry/v1/core/errors/_invalid_page_token.py index 5a85452af..8ec7c9738 100644 --- a/foundry/v1/core/errors/_invalid_page_token.py +++ b/foundry/v1/core/errors/_invalid_page_token.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.core.models._page_token import PageToken @@ -34,7 +33,7 @@ class InvalidPageTokenParameters(TypedDict): @dataclass -class InvalidPageToken(PalantirRPCException): +class InvalidPageToken(BadRequestError): name: Literal["InvalidPageToken"] parameters: InvalidPageTokenParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_invalid_parameter_combination.py b/foundry/v1/core/errors/_invalid_parameter_combination.py index 1d9aa4d0e..65aed8376 100644 --- a/foundry/v1/core/errors/_invalid_parameter_combination.py +++ b/foundry/v1/core/errors/_invalid_parameter_combination.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidParameterCombinationParameters(TypedDict): @@ -36,7 +35,7 @@ class InvalidParameterCombinationParameters(TypedDict): @dataclass -class InvalidParameterCombination(PalantirRPCException): +class InvalidParameterCombination(BadRequestError): name: Literal["InvalidParameterCombination"] parameters: InvalidParameterCombinationParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_missing_post_body.py b/foundry/v1/core/errors/_missing_post_body.py index d5fb3e83f..7fc64437f 100644 --- a/foundry/v1/core/errors/_missing_post_body.py +++ b/foundry/v1/core/errors/_missing_post_body.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingPostBodyParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingPostBodyParameters(TypedDict): @dataclass -class MissingPostBody(PalantirRPCException): +class MissingPostBody(BadRequestError): name: Literal["MissingPostBody"] parameters: MissingPostBodyParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_resource_name_already_exists.py b/foundry/v1/core/errors/_resource_name_already_exists.py index 102dcf62e..595271c28 100644 --- a/foundry/v1/core/errors/_resource_name_already_exists.py +++ b/foundry/v1/core/errors/_resource_name_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.core.models._folder_rid import FolderRid @@ -36,7 +35,7 @@ class ResourceNameAlreadyExistsParameters(TypedDict): @dataclass -class ResourceNameAlreadyExists(PalantirRPCException): +class ResourceNameAlreadyExists(ConflictError): name: Literal["ResourceNameAlreadyExists"] parameters: ResourceNameAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/core/errors/_unknown_distance_unit.py b/foundry/v1/core/errors/_unknown_distance_unit.py index ec73df6c9..fb5f44b4e 100644 --- a/foundry/v1/core/errors/_unknown_distance_unit.py +++ b/foundry/v1/core/errors/_unknown_distance_unit.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.core.models._distance_unit import DistanceUnit @@ -37,7 +36,7 @@ class UnknownDistanceUnitParameters(TypedDict): @dataclass -class UnknownDistanceUnit(PalantirRPCException): +class UnknownDistanceUnit(BadRequestError): name: Literal["UnknownDistanceUnit"] parameters: UnknownDistanceUnitParameters error_instance_id: str diff --git a/foundry/v1/datasets/branch.py b/foundry/v1/datasets/branch.py index dd6d1a5ab..5bb7c86b5 100644 --- a/foundry/v1/datasets/branch.py +++ b/foundry/v1/datasets/branch.py @@ -116,6 +116,7 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -158,6 +159,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -202,6 +204,7 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -251,6 +254,7 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -306,6 +310,7 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -380,6 +385,7 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -422,6 +428,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -466,6 +473,7 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -515,6 +523,7 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -570,6 +579,7 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -644,6 +654,7 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -686,6 +697,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -730,6 +742,7 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -779,6 +792,7 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -834,5 +848,6 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/datasets/dataset.py b/foundry/v1/datasets/dataset.py index 706e7ef56..cba2cb9e6 100644 --- a/foundry/v1/datasets/dataset.py +++ b/foundry/v1/datasets/dataset.py @@ -123,6 +123,7 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -172,6 +173,7 @@ def delete_schema( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -212,6 +214,7 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -263,6 +266,7 @@ def get_schema( body_type=None, response_type=Any, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -489,6 +493,7 @@ def read( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -539,6 +544,7 @@ def replace_schema( body_type=Any, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -608,6 +614,7 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -657,6 +664,7 @@ def delete_schema( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -697,6 +705,7 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -748,6 +757,7 @@ def get_schema( body_type=None, response_type=Any, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -815,6 +825,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -865,6 +876,7 @@ def replace_schema( body_type=Any, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -934,6 +946,7 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -983,6 +996,7 @@ def delete_schema( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1023,6 +1037,7 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1074,6 +1089,7 @@ def get_schema( body_type=None, response_type=Any, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1141,6 +1157,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1191,5 +1208,6 @@ def replace_schema( body_type=Any, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/datasets/errors/_abort_transaction_permission_denied.py b/foundry/v1/datasets/errors/_abort_transaction_permission_denied.py index 1ae9ed74a..b1a41fdda 100644 --- a/foundry/v1/datasets/errors/_abort_transaction_permission_denied.py +++ b/foundry/v1/datasets/errors/_abort_transaction_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class AbortTransactionPermissionDeniedParameters(TypedDict): @dataclass -class AbortTransactionPermissionDenied(PalantirRPCException): +class AbortTransactionPermissionDenied(PermissionDeniedError): name: Literal["AbortTransactionPermissionDenied"] parameters: AbortTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_branch_already_exists.py b/foundry/v1/datasets/errors/_branch_already_exists.py index 39ca6199f..a20902105 100644 --- a/foundry/v1/datasets/errors/_branch_already_exists.py +++ b/foundry/v1/datasets/errors/_branch_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class BranchAlreadyExistsParameters(TypedDict): @dataclass -class BranchAlreadyExists(PalantirRPCException): +class BranchAlreadyExists(ConflictError): name: Literal["BranchAlreadyExists"] parameters: BranchAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_branch_not_found.py b/foundry/v1/datasets/errors/_branch_not_found.py index 96a07b8c6..23535541e 100644 --- a/foundry/v1/datasets/errors/_branch_not_found.py +++ b/foundry/v1/datasets/errors/_branch_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class BranchNotFoundParameters(TypedDict): @dataclass -class BranchNotFound(PalantirRPCException): +class BranchNotFound(NotFoundError): name: Literal["BranchNotFound"] parameters: BranchNotFoundParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_column_types_not_supported.py b/foundry/v1/datasets/errors/_column_types_not_supported.py index 726e8d5ce..7415085d5 100644 --- a/foundry/v1/datasets/errors/_column_types_not_supported.py +++ b/foundry/v1/datasets/errors/_column_types_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class ColumnTypesNotSupportedParameters(TypedDict): @dataclass -class ColumnTypesNotSupported(PalantirRPCException): +class ColumnTypesNotSupported(BadRequestError): name: Literal["ColumnTypesNotSupported"] parameters: ColumnTypesNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_commit_transaction_permission_denied.py b/foundry/v1/datasets/errors/_commit_transaction_permission_denied.py index 0c19143c1..16ec10de5 100644 --- a/foundry/v1/datasets/errors/_commit_transaction_permission_denied.py +++ b/foundry/v1/datasets/errors/_commit_transaction_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class CommitTransactionPermissionDeniedParameters(TypedDict): @dataclass -class CommitTransactionPermissionDenied(PalantirRPCException): +class CommitTransactionPermissionDenied(PermissionDeniedError): name: Literal["CommitTransactionPermissionDenied"] parameters: CommitTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_create_branch_permission_denied.py b/foundry/v1/datasets/errors/_create_branch_permission_denied.py index 0b3e13261..d6a673056 100644 --- a/foundry/v1/datasets/errors/_create_branch_permission_denied.py +++ b/foundry/v1/datasets/errors/_create_branch_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class CreateBranchPermissionDeniedParameters(TypedDict): @dataclass -class CreateBranchPermissionDenied(PalantirRPCException): +class CreateBranchPermissionDenied(PermissionDeniedError): name: Literal["CreateBranchPermissionDenied"] parameters: CreateBranchPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_create_dataset_permission_denied.py b/foundry/v1/datasets/errors/_create_dataset_permission_denied.py index 52245d2eb..6d4b88ecd 100644 --- a/foundry/v1/datasets/errors/_create_dataset_permission_denied.py +++ b/foundry/v1/datasets/errors/_create_dataset_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.core.models._folder_rid import FolderRid from foundry.v1.datasets.models._dataset_name import DatasetName @@ -37,7 +36,7 @@ class CreateDatasetPermissionDeniedParameters(TypedDict): @dataclass -class CreateDatasetPermissionDenied(PalantirRPCException): +class CreateDatasetPermissionDenied(PermissionDeniedError): name: Literal["CreateDatasetPermissionDenied"] parameters: CreateDatasetPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_create_transaction_permission_denied.py b/foundry/v1/datasets/errors/_create_transaction_permission_denied.py index 026ba41b8..1fe1f1864 100644 --- a/foundry/v1/datasets/errors/_create_transaction_permission_denied.py +++ b/foundry/v1/datasets/errors/_create_transaction_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class CreateTransactionPermissionDeniedParameters(TypedDict): @dataclass -class CreateTransactionPermissionDenied(PalantirRPCException): +class CreateTransactionPermissionDenied(PermissionDeniedError): name: Literal["CreateTransactionPermissionDenied"] parameters: CreateTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_dataset_not_found.py b/foundry/v1/datasets/errors/_dataset_not_found.py index 061407b37..849a08897 100644 --- a/foundry/v1/datasets/errors/_dataset_not_found.py +++ b/foundry/v1/datasets/errors/_dataset_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class DatasetNotFoundParameters(TypedDict): @dataclass -class DatasetNotFound(PalantirRPCException): +class DatasetNotFound(NotFoundError): name: Literal["DatasetNotFound"] parameters: DatasetNotFoundParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_dataset_read_not_supported.py b/foundry/v1/datasets/errors/_dataset_read_not_supported.py index 38a4e0076..7e4f88746 100644 --- a/foundry/v1/datasets/errors/_dataset_read_not_supported.py +++ b/foundry/v1/datasets/errors/_dataset_read_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class DatasetReadNotSupportedParameters(TypedDict): @dataclass -class DatasetReadNotSupported(PalantirRPCException): +class DatasetReadNotSupported(BadRequestError): name: Literal["DatasetReadNotSupported"] parameters: DatasetReadNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_delete_branch_permission_denied.py b/foundry/v1/datasets/errors/_delete_branch_permission_denied.py index ee4a155b5..79bef3587 100644 --- a/foundry/v1/datasets/errors/_delete_branch_permission_denied.py +++ b/foundry/v1/datasets/errors/_delete_branch_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class DeleteBranchPermissionDeniedParameters(TypedDict): @dataclass -class DeleteBranchPermissionDenied(PalantirRPCException): +class DeleteBranchPermissionDenied(PermissionDeniedError): name: Literal["DeleteBranchPermissionDenied"] parameters: DeleteBranchPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_delete_schema_permission_denied.py b/foundry/v1/datasets/errors/_delete_schema_permission_denied.py index b08b941a9..8bb9d8757 100644 --- a/foundry/v1/datasets/errors/_delete_schema_permission_denied.py +++ b/foundry/v1/datasets/errors/_delete_schema_permission_denied.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -41,7 +40,7 @@ class DeleteSchemaPermissionDeniedParameters(TypedDict): @dataclass -class DeleteSchemaPermissionDenied(PalantirRPCException): +class DeleteSchemaPermissionDenied(PermissionDeniedError): name: Literal["DeleteSchemaPermissionDenied"] parameters: DeleteSchemaPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_file_already_exists.py b/foundry/v1/datasets/errors/_file_already_exists.py index 3e256763e..d577319c1 100644 --- a/foundry/v1/datasets/errors/_file_already_exists.py +++ b/foundry/v1/datasets/errors/_file_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.core.models._file_path import FilePath from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -40,7 +39,7 @@ class FileAlreadyExistsParameters(TypedDict): @dataclass -class FileAlreadyExists(PalantirRPCException): +class FileAlreadyExists(NotFoundError): name: Literal["FileAlreadyExists"] parameters: FileAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_file_not_found_on_branch.py b/foundry/v1/datasets/errors/_file_not_found_on_branch.py index 8b1b94ae0..86e95cf60 100644 --- a/foundry/v1/datasets/errors/_file_not_found_on_branch.py +++ b/foundry/v1/datasets/errors/_file_not_found_on_branch.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.core.models._file_path import FilePath from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -40,7 +39,7 @@ class FileNotFoundOnBranchParameters(TypedDict): @dataclass -class FileNotFoundOnBranch(PalantirRPCException): +class FileNotFoundOnBranch(NotFoundError): name: Literal["FileNotFoundOnBranch"] parameters: FileNotFoundOnBranchParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_file_not_found_on_transaction_range.py b/foundry/v1/datasets/errors/_file_not_found_on_transaction_range.py index 44a73f3a1..b79804e21 100644 --- a/foundry/v1/datasets/errors/_file_not_found_on_transaction_range.py +++ b/foundry/v1/datasets/errors/_file_not_found_on_transaction_range.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.core.models._file_path import FilePath from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -43,7 +42,7 @@ class FileNotFoundOnTransactionRangeParameters(TypedDict): @dataclass -class FileNotFoundOnTransactionRange(PalantirRPCException): +class FileNotFoundOnTransactionRange(NotFoundError): name: Literal["FileNotFoundOnTransactionRange"] parameters: FileNotFoundOnTransactionRangeParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_invalid_branch_id.py b/foundry/v1/datasets/errors/_invalid_branch_id.py index f52c11d3b..6f2c3ef20 100644 --- a/foundry/v1/datasets/errors/_invalid_branch_id.py +++ b/foundry/v1/datasets/errors/_invalid_branch_id.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._branch_id import BranchId @@ -34,7 +33,7 @@ class InvalidBranchIdParameters(TypedDict): @dataclass -class InvalidBranchId(PalantirRPCException): +class InvalidBranchId(BadRequestError): name: Literal["InvalidBranchId"] parameters: InvalidBranchIdParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_invalid_transaction_type.py b/foundry/v1/datasets/errors/_invalid_transaction_type.py index af2fea3d3..c24e49498 100644 --- a/foundry/v1/datasets/errors/_invalid_transaction_type.py +++ b/foundry/v1/datasets/errors/_invalid_transaction_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid from foundry.v1.datasets.models._transaction_type import TransactionType @@ -40,7 +39,7 @@ class InvalidTransactionTypeParameters(TypedDict): @dataclass -class InvalidTransactionType(PalantirRPCException): +class InvalidTransactionType(BadRequestError): name: Literal["InvalidTransactionType"] parameters: InvalidTransactionTypeParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_open_transaction_already_exists.py b/foundry/v1/datasets/errors/_open_transaction_already_exists.py index abfa23f1e..ed17d5549 100644 --- a/foundry/v1/datasets/errors/_open_transaction_already_exists.py +++ b/foundry/v1/datasets/errors/_open_transaction_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class OpenTransactionAlreadyExistsParameters(TypedDict): @dataclass -class OpenTransactionAlreadyExists(PalantirRPCException): +class OpenTransactionAlreadyExists(ConflictError): name: Literal["OpenTransactionAlreadyExists"] parameters: OpenTransactionAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_put_schema_permission_denied.py b/foundry/v1/datasets/errors/_put_schema_permission_denied.py index 6fec08bc8..478c62980 100644 --- a/foundry/v1/datasets/errors/_put_schema_permission_denied.py +++ b/foundry/v1/datasets/errors/_put_schema_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class PutSchemaPermissionDeniedParameters(TypedDict): @dataclass -class PutSchemaPermissionDenied(PalantirRPCException): +class PutSchemaPermissionDenied(PermissionDeniedError): name: Literal["PutSchemaPermissionDenied"] parameters: PutSchemaPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_read_table_permission_denied.py b/foundry/v1/datasets/errors/_read_table_permission_denied.py index c5aca2c7c..f1dedf06c 100644 --- a/foundry/v1/datasets/errors/_read_table_permission_denied.py +++ b/foundry/v1/datasets/errors/_read_table_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class ReadTablePermissionDeniedParameters(TypedDict): @dataclass -class ReadTablePermissionDenied(PalantirRPCException): +class ReadTablePermissionDenied(PermissionDeniedError): name: Literal["ReadTablePermissionDenied"] parameters: ReadTablePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_schema_not_found.py b/foundry/v1/datasets/errors/_schema_not_found.py index 8430f3670..428d346ae 100644 --- a/foundry/v1/datasets/errors/_schema_not_found.py +++ b/foundry/v1/datasets/errors/_schema_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.datasets.models._branch_id import BranchId from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -41,7 +40,7 @@ class SchemaNotFoundParameters(TypedDict): @dataclass -class SchemaNotFound(PalantirRPCException): +class SchemaNotFound(NotFoundError): name: Literal["SchemaNotFound"] parameters: SchemaNotFoundParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_transaction_not_committed.py b/foundry/v1/datasets/errors/_transaction_not_committed.py index 895b5faa5..4722cf5f0 100644 --- a/foundry/v1/datasets/errors/_transaction_not_committed.py +++ b/foundry/v1/datasets/errors/_transaction_not_committed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid from foundry.v1.datasets.models._transaction_status import TransactionStatus @@ -40,7 +39,7 @@ class TransactionNotCommittedParameters(TypedDict): @dataclass -class TransactionNotCommitted(PalantirRPCException): +class TransactionNotCommitted(BadRequestError): name: Literal["TransactionNotCommitted"] parameters: TransactionNotCommittedParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_transaction_not_found.py b/foundry/v1/datasets/errors/_transaction_not_found.py index 9794584aa..4af4f0152 100644 --- a/foundry/v1/datasets/errors/_transaction_not_found.py +++ b/foundry/v1/datasets/errors/_transaction_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class TransactionNotFoundParameters(TypedDict): @dataclass -class TransactionNotFound(PalantirRPCException): +class TransactionNotFound(NotFoundError): name: Literal["TransactionNotFound"] parameters: TransactionNotFoundParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_transaction_not_open.py b/foundry/v1/datasets/errors/_transaction_not_open.py index 26df2b8b1..94e610be9 100644 --- a/foundry/v1/datasets/errors/_transaction_not_open.py +++ b/foundry/v1/datasets/errors/_transaction_not_open.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid from foundry.v1.datasets.models._transaction_status import TransactionStatus @@ -40,7 +39,7 @@ class TransactionNotOpenParameters(TypedDict): @dataclass -class TransactionNotOpen(PalantirRPCException): +class TransactionNotOpen(BadRequestError): name: Literal["TransactionNotOpen"] parameters: TransactionNotOpenParameters error_instance_id: str diff --git a/foundry/v1/datasets/errors/_upload_file_permission_denied.py b/foundry/v1/datasets/errors/_upload_file_permission_denied.py index d20028570..6bdfc8fec 100644 --- a/foundry/v1/datasets/errors/_upload_file_permission_denied.py +++ b/foundry/v1/datasets/errors/_upload_file_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.core.models._file_path import FilePath from foundry.v1.datasets.models._dataset_rid import DatasetRid from foundry.v1.datasets.models._transaction_rid import TransactionRid @@ -40,7 +39,7 @@ class UploadFilePermissionDeniedParameters(TypedDict): @dataclass -class UploadFilePermissionDenied(PalantirRPCException): +class UploadFilePermissionDenied(PermissionDeniedError): name: Literal["UploadFilePermissionDenied"] parameters: UploadFilePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/datasets/file.py b/foundry/v1/datasets/file.py index b95c91529..bea76bd2a 100644 --- a/foundry/v1/datasets/file.py +++ b/foundry/v1/datasets/file.py @@ -130,6 +130,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -208,6 +209,7 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -292,6 +294,7 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -382,6 +385,7 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -662,6 +666,7 @@ def read( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -740,6 +745,7 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -822,6 +828,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -900,6 +907,7 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -984,6 +992,7 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1074,6 +1083,7 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1153,6 +1163,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1231,6 +1242,7 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1313,6 +1325,7 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1391,6 +1404,7 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1475,6 +1489,7 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1565,6 +1580,7 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1644,6 +1660,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1722,5 +1739,6 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/datasets/transaction.py b/foundry/v1/datasets/transaction.py index 155108cdd..2036985f8 100644 --- a/foundry/v1/datasets/transaction.py +++ b/foundry/v1/datasets/transaction.py @@ -101,6 +101,7 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -146,6 +147,7 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -202,6 +204,7 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -246,6 +249,7 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -309,6 +313,7 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -354,6 +359,7 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -410,6 +416,7 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -454,6 +461,7 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -517,6 +525,7 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -562,6 +571,7 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -618,6 +628,7 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -662,5 +673,6 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/action.py b/foundry/v1/ontologies/action.py index bc25479bd..6826e0a10 100644 --- a/foundry/v1/ontologies/action.py +++ b/foundry/v1/ontologies/action.py @@ -124,6 +124,7 @@ def apply( ), response_type=ApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -187,6 +188,7 @@ def apply_batch( ), response_type=BatchApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -249,6 +251,7 @@ def validate( ), response_type=ValidateActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -327,6 +330,7 @@ def apply( ), response_type=ApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -390,6 +394,7 @@ def apply_batch( ), response_type=BatchApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -452,6 +457,7 @@ def validate( ), response_type=ValidateActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -530,6 +536,7 @@ def apply( ), response_type=ApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -593,6 +600,7 @@ def apply_batch( ), response_type=BatchApplyActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -655,5 +663,6 @@ def validate( ), response_type=ValidateActionResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/action_type.py b/foundry/v1/ontologies/action_type.py index 810049543..801400d46 100644 --- a/foundry/v1/ontologies/action_type.py +++ b/foundry/v1/ontologies/action_type.py @@ -102,6 +102,7 @@ def get( body_type=None, response_type=ActionType, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -154,6 +155,7 @@ def list( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -212,6 +214,7 @@ def page( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -274,6 +277,7 @@ def get( body_type=None, response_type=ActionType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -326,6 +330,7 @@ def list( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -384,6 +389,7 @@ def page( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -446,6 +452,7 @@ def get( body_type=None, response_type=ActionType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -498,6 +505,7 @@ def list( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -556,5 +564,6 @@ def page( body_type=None, response_type=ListActionTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/errors/_action_contains_duplicate_edits.py b/foundry/v1/ontologies/errors/_action_contains_duplicate_edits.py index 20f198eaa..744f6411e 100644 --- a/foundry/v1/ontologies/errors/_action_contains_duplicate_edits.py +++ b/foundry/v1/ontologies/errors/_action_contains_duplicate_edits.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ActionContainsDuplicateEditsParameters(TypedDict): @@ -31,7 +30,7 @@ class ActionContainsDuplicateEditsParameters(TypedDict): @dataclass -class ActionContainsDuplicateEdits(PalantirRPCException): +class ActionContainsDuplicateEdits(ConflictError): name: Literal["ActionContainsDuplicateEdits"] parameters: ActionContainsDuplicateEditsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_edited_properties_not_found.py b/foundry/v1/ontologies/errors/_action_edited_properties_not_found.py index f94318570..874bf364e 100644 --- a/foundry/v1/ontologies/errors/_action_edited_properties_not_found.py +++ b/foundry/v1/ontologies/errors/_action_edited_properties_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ActionEditedPropertiesNotFoundParameters(TypedDict): @@ -34,7 +33,7 @@ class ActionEditedPropertiesNotFoundParameters(TypedDict): @dataclass -class ActionEditedPropertiesNotFound(PalantirRPCException): +class ActionEditedPropertiesNotFound(BadRequestError): name: Literal["ActionEditedPropertiesNotFound"] parameters: ActionEditedPropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_edits_read_only_entity.py b/foundry/v1/ontologies/errors/_action_edits_read_only_entity.py index 320dc940e..6d3d3786b 100644 --- a/foundry/v1/ontologies/errors/_action_edits_read_only_entity.py +++ b/foundry/v1/ontologies/errors/_action_edits_read_only_entity.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_rid import ObjectTypeRid @@ -35,7 +34,7 @@ class ActionEditsReadOnlyEntityParameters(TypedDict): @dataclass -class ActionEditsReadOnlyEntity(PalantirRPCException): +class ActionEditsReadOnlyEntity(BadRequestError): name: Literal["ActionEditsReadOnlyEntity"] parameters: ActionEditsReadOnlyEntityParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_not_found.py b/foundry/v1/ontologies/errors/_action_not_found.py index da87002cd..99de66d65 100644 --- a/foundry/v1/ontologies/errors/_action_not_found.py +++ b/foundry/v1/ontologies/errors/_action_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._action_rid import ActionRid @@ -34,7 +33,7 @@ class ActionNotFoundParameters(TypedDict): @dataclass -class ActionNotFound(PalantirRPCException): +class ActionNotFound(NotFoundError): name: Literal["ActionNotFound"] parameters: ActionNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_parameter_interface_type_not_found.py b/foundry/v1/ontologies/errors/_action_parameter_interface_type_not_found.py index 9a76aca9e..e97d890cd 100644 --- a/foundry/v1/ontologies/errors/_action_parameter_interface_type_not_found.py +++ b/foundry/v1/ontologies/errors/_action_parameter_interface_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterInterfaceTypeNotFoundParameters(TypedDict): @dataclass -class ActionParameterInterfaceTypeNotFound(PalantirRPCException): +class ActionParameterInterfaceTypeNotFound(NotFoundError): name: Literal["ActionParameterInterfaceTypeNotFound"] parameters: ActionParameterInterfaceTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_parameter_object_not_found.py b/foundry/v1/ontologies/errors/_action_parameter_object_not_found.py index 6ba3b9276..2a95d13a1 100644 --- a/foundry/v1/ontologies/errors/_action_parameter_object_not_found.py +++ b/foundry/v1/ontologies/errors/_action_parameter_object_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterObjectNotFoundParameters(TypedDict): @dataclass -class ActionParameterObjectNotFound(PalantirRPCException): +class ActionParameterObjectNotFound(NotFoundError): name: Literal["ActionParameterObjectNotFound"] parameters: ActionParameterObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_parameter_object_type_not_found.py b/foundry/v1/ontologies/errors/_action_parameter_object_type_not_found.py index 3da2ce68a..45a0ad266 100644 --- a/foundry/v1/ontologies/errors/_action_parameter_object_type_not_found.py +++ b/foundry/v1/ontologies/errors/_action_parameter_object_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterObjectTypeNotFoundParameters(TypedDict): @dataclass -class ActionParameterObjectTypeNotFound(PalantirRPCException): +class ActionParameterObjectTypeNotFound(NotFoundError): name: Literal["ActionParameterObjectTypeNotFound"] parameters: ActionParameterObjectTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_type_not_found.py b/foundry/v1/ontologies/errors/_action_type_not_found.py index d6c46372f..9600c603a 100644 --- a/foundry/v1/ontologies/errors/_action_type_not_found.py +++ b/foundry/v1/ontologies/errors/_action_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v1.ontologies.models._action_type_rid import ActionTypeRid @@ -38,7 +37,7 @@ class ActionTypeNotFoundParameters(TypedDict): @dataclass -class ActionTypeNotFound(PalantirRPCException): +class ActionTypeNotFound(NotFoundError): name: Literal["ActionTypeNotFound"] parameters: ActionTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_action_validation_failed.py b/foundry/v1/ontologies/errors/_action_validation_failed.py index fc3de5ab4..3de7393a2 100644 --- a/foundry/v1/ontologies/errors/_action_validation_failed.py +++ b/foundry/v1/ontologies/errors/_action_validation_failed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._action_type_api_name import ActionTypeApiName @@ -37,7 +36,7 @@ class ActionValidationFailedParameters(TypedDict): @dataclass -class ActionValidationFailed(PalantirRPCException): +class ActionValidationFailed(BadRequestError): name: Literal["ActionValidationFailed"] parameters: ActionValidationFailedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_aggregation_group_count_exceeded_limit.py b/foundry/v1/ontologies/errors/_aggregation_group_count_exceeded_limit.py index c4db90c42..ccc427482 100644 --- a/foundry/v1/ontologies/errors/_aggregation_group_count_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_aggregation_group_count_exceeded_limit.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationGroupCountExceededLimitParameters(TypedDict): @@ -42,7 +41,7 @@ class AggregationGroupCountExceededLimitParameters(TypedDict): @dataclass -class AggregationGroupCountExceededLimit(PalantirRPCException): +class AggregationGroupCountExceededLimit(BadRequestError): name: Literal["AggregationGroupCountExceededLimit"] parameters: AggregationGroupCountExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_aggregation_memory_exceeded_limit.py b/foundry/v1/ontologies/errors/_aggregation_memory_exceeded_limit.py index c32db089b..4b368d470 100644 --- a/foundry/v1/ontologies/errors/_aggregation_memory_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_aggregation_memory_exceeded_limit.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationMemoryExceededLimitParameters(TypedDict): @@ -42,7 +41,7 @@ class AggregationMemoryExceededLimitParameters(TypedDict): @dataclass -class AggregationMemoryExceededLimit(PalantirRPCException): +class AggregationMemoryExceededLimit(BadRequestError): name: Literal["AggregationMemoryExceededLimit"] parameters: AggregationMemoryExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py b/foundry/v1/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py index eac302232..d22d9d084 100644 --- a/foundry/v1/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationNestedObjectSetSizeExceededLimitParameters(TypedDict): @@ -38,7 +37,7 @@ class AggregationNestedObjectSetSizeExceededLimitParameters(TypedDict): @dataclass -class AggregationNestedObjectSetSizeExceededLimit(PalantirRPCException): +class AggregationNestedObjectSetSizeExceededLimit(BadRequestError): name: Literal["AggregationNestedObjectSetSizeExceededLimit"] parameters: AggregationNestedObjectSetSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_apply_action_failed.py b/foundry/v1/ontologies/errors/_apply_action_failed.py index 5fe529fb9..f73fd1ee3 100644 --- a/foundry/v1/ontologies/errors/_apply_action_failed.py +++ b/foundry/v1/ontologies/errors/_apply_action_failed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ApplyActionFailedParameters(TypedDict): @@ -30,7 +29,7 @@ class ApplyActionFailedParameters(TypedDict): @dataclass -class ApplyActionFailed(PalantirRPCException): +class ApplyActionFailed(BadRequestError): name: Literal["ApplyActionFailed"] parameters: ApplyActionFailedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_attachment_not_found.py b/foundry/v1/ontologies/errors/_attachment_not_found.py index fd94f39ea..d5fc637b7 100644 --- a/foundry/v1/ontologies/errors/_attachment_not_found.py +++ b/foundry/v1/ontologies/errors/_attachment_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._attachment_rid import AttachmentRid @@ -40,7 +39,7 @@ class AttachmentNotFoundParameters(TypedDict): @dataclass -class AttachmentNotFound(PalantirRPCException): +class AttachmentNotFound(NotFoundError): name: Literal["AttachmentNotFound"] parameters: AttachmentNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_attachment_size_exceeded_limit.py b/foundry/v1/ontologies/errors/_attachment_size_exceeded_limit.py index d5081a6fa..179a408bc 100644 --- a/foundry/v1/ontologies/errors/_attachment_size_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_attachment_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AttachmentSizeExceededLimitParameters(TypedDict): @@ -38,7 +37,7 @@ class AttachmentSizeExceededLimitParameters(TypedDict): @dataclass -class AttachmentSizeExceededLimit(PalantirRPCException): +class AttachmentSizeExceededLimit(BadRequestError): name: Literal["AttachmentSizeExceededLimit"] parameters: AttachmentSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_composite_primary_key_not_supported.py b/foundry/v1/ontologies/errors/_composite_primary_key_not_supported.py index cf3d50726..54ade83e0 100644 --- a/foundry/v1/ontologies/errors/_composite_primary_key_not_supported.py +++ b/foundry/v1/ontologies/errors/_composite_primary_key_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -41,7 +40,7 @@ class CompositePrimaryKeyNotSupportedParameters(TypedDict): @dataclass -class CompositePrimaryKeyNotSupported(PalantirRPCException): +class CompositePrimaryKeyNotSupported(BadRequestError): name: Literal["CompositePrimaryKeyNotSupported"] parameters: CompositePrimaryKeyNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_derived_property_api_names_not_unique.py b/foundry/v1/ontologies/errors/_derived_property_api_names_not_unique.py index 11c473601..e2fc78a5c 100644 --- a/foundry/v1/ontologies/errors/_derived_property_api_names_not_unique.py +++ b/foundry/v1/ontologies/errors/_derived_property_api_names_not_unique.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._derived_property_api_name import DerivedPropertyApiName # NOQA @@ -35,7 +34,7 @@ class DerivedPropertyApiNamesNotUniqueParameters(TypedDict): @dataclass -class DerivedPropertyApiNamesNotUnique(PalantirRPCException): +class DerivedPropertyApiNamesNotUnique(BadRequestError): name: Literal["DerivedPropertyApiNamesNotUnique"] parameters: DerivedPropertyApiNamesNotUniqueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_duplicate_order_by.py b/foundry/v1/ontologies/errors/_duplicate_order_by.py index bb8df4baf..a733c769e 100644 --- a/foundry/v1/ontologies/errors/_duplicate_order_by.py +++ b/foundry/v1/ontologies/errors/_duplicate_order_by.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -35,7 +34,7 @@ class DuplicateOrderByParameters(TypedDict): @dataclass -class DuplicateOrderBy(PalantirRPCException): +class DuplicateOrderBy(BadRequestError): name: Literal["DuplicateOrderBy"] parameters: DuplicateOrderByParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_edit_object_permission_denied.py b/foundry/v1/ontologies/errors/_edit_object_permission_denied.py index a4dc1c791..48d2dcd4d 100644 --- a/foundry/v1/ontologies/errors/_edit_object_permission_denied.py +++ b/foundry/v1/ontologies/errors/_edit_object_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class EditObjectPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class EditObjectPermissionDeniedParameters(TypedDict): @dataclass -class EditObjectPermissionDenied(PalantirRPCException): +class EditObjectPermissionDenied(PermissionDeniedError): name: Literal["EditObjectPermissionDenied"] parameters: EditObjectPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_function_encountered_user_facing_error.py b/foundry/v1/ontologies/errors/_function_encountered_user_facing_error.py index 4e7e32e8e..17849778c 100644 --- a/foundry/v1/ontologies/errors/_function_encountered_user_facing_error.py +++ b/foundry/v1/ontologies/errors/_function_encountered_user_facing_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -42,7 +41,7 @@ class FunctionEncounteredUserFacingErrorParameters(TypedDict): @dataclass -class FunctionEncounteredUserFacingError(PalantirRPCException): +class FunctionEncounteredUserFacingError(BadRequestError): name: Literal["FunctionEncounteredUserFacingError"] parameters: FunctionEncounteredUserFacingErrorParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_function_execution_failed.py b/foundry/v1/ontologies/errors/_function_execution_failed.py index 728ddd57c..aa305a872 100644 --- a/foundry/v1/ontologies/errors/_function_execution_failed.py +++ b/foundry/v1/ontologies/errors/_function_execution_failed.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -41,7 +40,7 @@ class FunctionExecutionFailedParameters(TypedDict): @dataclass -class FunctionExecutionFailed(PalantirRPCException): +class FunctionExecutionFailed(BadRequestError): name: Literal["FunctionExecutionFailed"] parameters: FunctionExecutionFailedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_function_execution_timed_out.py b/foundry/v1/ontologies/errors/_function_execution_timed_out.py index d1fd05f15..085410c51 100644 --- a/foundry/v1/ontologies/errors/_function_execution_timed_out.py +++ b/foundry/v1/ontologies/errors/_function_execution_timed_out.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -36,7 +35,7 @@ class FunctionExecutionTimedOutParameters(TypedDict): @dataclass -class FunctionExecutionTimedOut(PalantirRPCException): +class FunctionExecutionTimedOut(InternalServerError): name: Literal["FunctionExecutionTimedOut"] parameters: FunctionExecutionTimedOutParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_function_invalid_input.py b/foundry/v1/ontologies/errors/_function_invalid_input.py index 8c2e4fc5d..8485623a1 100644 --- a/foundry/v1/ontologies/errors/_function_invalid_input.py +++ b/foundry/v1/ontologies/errors/_function_invalid_input.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -36,7 +35,7 @@ class FunctionInvalidInputParameters(TypedDict): @dataclass -class FunctionInvalidInput(PalantirRPCException): +class FunctionInvalidInput(BadRequestError): name: Literal["FunctionInvalidInput"] parameters: FunctionInvalidInputParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_interface_type_not_found.py b/foundry/v1/ontologies/errors/_interface_type_not_found.py index 9e14df519..43989fa43 100644 --- a/foundry/v1/ontologies/errors/_interface_type_not_found.py +++ b/foundry/v1/ontologies/errors/_interface_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._interface_type_api_name import InterfaceTypeApiName from foundry.v1.ontologies.models._interface_type_rid import InterfaceTypeRid @@ -38,7 +37,7 @@ class InterfaceTypeNotFoundParameters(TypedDict): @dataclass -class InterfaceTypeNotFound(PalantirRPCException): +class InterfaceTypeNotFound(NotFoundError): name: Literal["InterfaceTypeNotFound"] parameters: InterfaceTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_interface_types_not_found.py b/foundry/v1/ontologies/errors/_interface_types_not_found.py index 2caf978f8..ea0c8e7d0 100644 --- a/foundry/v1/ontologies/errors/_interface_types_not_found.py +++ b/foundry/v1/ontologies/errors/_interface_types_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._interface_type_api_name import InterfaceTypeApiName from foundry.v1.ontologies.models._interface_type_rid import InterfaceTypeRid @@ -38,7 +37,7 @@ class InterfaceTypesNotFoundParameters(TypedDict): @dataclass -class InterfaceTypesNotFound(PalantirRPCException): +class InterfaceTypesNotFound(NotFoundError): name: Literal["InterfaceTypesNotFound"] parameters: InterfaceTypesNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_aggregation_ordering.py b/foundry/v1/ontologies/errors/_invalid_aggregation_ordering.py index ec905b556..37df7cf9e 100644 --- a/foundry/v1/ontologies/errors/_invalid_aggregation_ordering.py +++ b/foundry/v1/ontologies/errors/_invalid_aggregation_ordering.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAggregationOrderingParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAggregationOrderingParameters(TypedDict): @dataclass -class InvalidAggregationOrdering(PalantirRPCException): +class InvalidAggregationOrdering(BadRequestError): name: Literal["InvalidAggregationOrdering"] parameters: InvalidAggregationOrderingParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_aggregation_range.py b/foundry/v1/ontologies/errors/_invalid_aggregation_range.py index 1a9677510..d159f1a6e 100644 --- a/foundry/v1/ontologies/errors/_invalid_aggregation_range.py +++ b/foundry/v1/ontologies/errors/_invalid_aggregation_range.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAggregationRangeParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAggregationRangeParameters(TypedDict): @dataclass -class InvalidAggregationRange(PalantirRPCException): +class InvalidAggregationRange(BadRequestError): name: Literal["InvalidAggregationRange"] parameters: InvalidAggregationRangeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_aggregation_range_property_type.py b/foundry/v1/ontologies/errors/_invalid_aggregation_range_property_type.py index 2623a5eec..4f90568be 100644 --- a/foundry/v1/ontologies/errors/_invalid_aggregation_range_property_type.py +++ b/foundry/v1/ontologies/errors/_invalid_aggregation_range_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidAggregationRangePropertyTypeParameters(TypedDict): @dataclass -class InvalidAggregationRangePropertyType(PalantirRPCException): +class InvalidAggregationRangePropertyType(BadRequestError): name: Literal["InvalidAggregationRangePropertyType"] parameters: InvalidAggregationRangePropertyTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_aggregation_range_value.py b/foundry/v1/ontologies/errors/_invalid_aggregation_range_value.py index 7e838bdc6..debbd786e 100644 --- a/foundry/v1/ontologies/errors/_invalid_aggregation_range_value.py +++ b/foundry/v1/ontologies/errors/_invalid_aggregation_range_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidAggregationRangeValueParameters(TypedDict): @dataclass -class InvalidAggregationRangeValue(PalantirRPCException): +class InvalidAggregationRangeValue(BadRequestError): name: Literal["InvalidAggregationRangeValue"] parameters: InvalidAggregationRangeValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_apply_action_option_combination.py b/foundry/v1/ontologies/errors/_invalid_apply_action_option_combination.py index 324ad4120..ef927852e 100644 --- a/foundry/v1/ontologies/errors/_invalid_apply_action_option_combination.py +++ b/foundry/v1/ontologies/errors/_invalid_apply_action_option_combination.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._apply_action_request_options import ( ApplyActionRequestOptions, ) # NOQA @@ -37,7 +36,7 @@ class InvalidApplyActionOptionCombinationParameters(TypedDict): @dataclass -class InvalidApplyActionOptionCombination(PalantirRPCException): +class InvalidApplyActionOptionCombination(BadRequestError): name: Literal["InvalidApplyActionOptionCombination"] parameters: InvalidApplyActionOptionCombinationParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_content_length.py b/foundry/v1/ontologies/errors/_invalid_content_length.py index 0395a050b..1eebcc2ea 100644 --- a/foundry/v1/ontologies/errors/_invalid_content_length.py +++ b/foundry/v1/ontologies/errors/_invalid_content_length.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidContentLengthParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidContentLengthParameters(TypedDict): @dataclass -class InvalidContentLength(PalantirRPCException): +class InvalidContentLength(BadRequestError): name: Literal["InvalidContentLength"] parameters: InvalidContentLengthParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_content_type.py b/foundry/v1/ontologies/errors/_invalid_content_type.py index 59fd3ad0e..204c9edf1 100644 --- a/foundry/v1/ontologies/errors/_invalid_content_type.py +++ b/foundry/v1/ontologies/errors/_invalid_content_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidContentTypeParameters(TypedDict): @@ -34,7 +33,7 @@ class InvalidContentTypeParameters(TypedDict): @dataclass -class InvalidContentType(PalantirRPCException): +class InvalidContentType(BadRequestError): name: Literal["InvalidContentType"] parameters: InvalidContentTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_duration_group_by_property_type.py b/foundry/v1/ontologies/errors/_invalid_duration_group_by_property_type.py index e0065fe8d..7e203ed4f 100644 --- a/foundry/v1/ontologies/errors/_invalid_duration_group_by_property_type.py +++ b/foundry/v1/ontologies/errors/_invalid_duration_group_by_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidDurationGroupByPropertyTypeParameters(TypedDict): @dataclass -class InvalidDurationGroupByPropertyType(PalantirRPCException): +class InvalidDurationGroupByPropertyType(BadRequestError): name: Literal["InvalidDurationGroupByPropertyType"] parameters: InvalidDurationGroupByPropertyTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_duration_group_by_value.py b/foundry/v1/ontologies/errors/_invalid_duration_group_by_value.py index f0b76f2a4..a66b65e6c 100644 --- a/foundry/v1/ontologies/errors/_invalid_duration_group_by_value.py +++ b/foundry/v1/ontologies/errors/_invalid_duration_group_by_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidDurationGroupByValueParameters(TypedDict): @@ -35,7 +34,7 @@ class InvalidDurationGroupByValueParameters(TypedDict): @dataclass -class InvalidDurationGroupByValue(PalantirRPCException): +class InvalidDurationGroupByValue(BadRequestError): name: Literal["InvalidDurationGroupByValue"] parameters: InvalidDurationGroupByValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_fields.py b/foundry/v1/ontologies/errors/_invalid_fields.py index 8893a4513..dfec1c450 100644 --- a/foundry/v1/ontologies/errors/_invalid_fields.py +++ b/foundry/v1/ontologies/errors/_invalid_fields.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidFieldsParameters(TypedDict): @@ -37,7 +36,7 @@ class InvalidFieldsParameters(TypedDict): @dataclass -class InvalidFields(PalantirRPCException): +class InvalidFields(BadRequestError): name: Literal["InvalidFields"] parameters: InvalidFieldsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_group_id.py b/foundry/v1/ontologies/errors/_invalid_group_id.py index b41f81158..493c19dfe 100644 --- a/foundry/v1/ontologies/errors/_invalid_group_id.py +++ b/foundry/v1/ontologies/errors/_invalid_group_id.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidGroupIdParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidGroupIdParameters(TypedDict): @dataclass -class InvalidGroupId(PalantirRPCException): +class InvalidGroupId(BadRequestError): name: Literal["InvalidGroupId"] parameters: InvalidGroupIdParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_order_type.py b/foundry/v1/ontologies/errors/_invalid_order_type.py index 4300be191..b287d7911 100644 --- a/foundry/v1/ontologies/errors/_invalid_order_type.py +++ b/foundry/v1/ontologies/errors/_invalid_order_type.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._search_order_by_type import SearchOrderByType @@ -35,7 +34,7 @@ class InvalidOrderTypeParameters(TypedDict): @dataclass -class InvalidOrderType(PalantirRPCException): +class InvalidOrderType(BadRequestError): name: Literal["InvalidOrderType"] parameters: InvalidOrderTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_parameter_value.py b/foundry/v1/ontologies/errors/_invalid_parameter_value.py index 860c43d3f..f8ba28963 100644 --- a/foundry/v1/ontologies/errors/_invalid_parameter_value.py +++ b/foundry/v1/ontologies/errors/_invalid_parameter_value.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._data_value import DataValue from foundry.v1.ontologies.models._ontology_data_type import OntologyDataType from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -47,7 +46,7 @@ class InvalidParameterValueParameters(TypedDict): @dataclass -class InvalidParameterValue(PalantirRPCException): +class InvalidParameterValue(BadRequestError): name: Literal["InvalidParameterValue"] parameters: InvalidParameterValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_property_filter_value.py b/foundry/v1/ontologies/errors/_invalid_property_filter_value.py index 25c54c4c3..0c061cf30 100644 --- a/foundry/v1/ontologies/errors/_invalid_property_filter_value.py +++ b/foundry/v1/ontologies/errors/_invalid_property_filter_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._filter_value import FilterValue from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_filter import PropertyFilter @@ -46,7 +45,7 @@ class InvalidPropertyFilterValueParameters(TypedDict): @dataclass -class InvalidPropertyFilterValue(PalantirRPCException): +class InvalidPropertyFilterValue(BadRequestError): name: Literal["InvalidPropertyFilterValue"] parameters: InvalidPropertyFilterValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_property_filters_combination.py b/foundry/v1/ontologies/errors/_invalid_property_filters_combination.py index 3ab5c431a..c21d74349 100644 --- a/foundry/v1/ontologies/errors/_invalid_property_filters_combination.py +++ b/foundry/v1/ontologies/errors/_invalid_property_filters_combination.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_filter import PropertyFilter @@ -38,7 +37,7 @@ class InvalidPropertyFiltersCombinationParameters(TypedDict): @dataclass -class InvalidPropertyFiltersCombination(PalantirRPCException): +class InvalidPropertyFiltersCombination(BadRequestError): name: Literal["InvalidPropertyFiltersCombination"] parameters: InvalidPropertyFiltersCombinationParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_property_type.py b/foundry/v1/ontologies/errors/_invalid_property_type.py index 189101039..31810b42c 100644 --- a/foundry/v1/ontologies/errors/_invalid_property_type.py +++ b/foundry/v1/ontologies/errors/_invalid_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._value_type import ValueType @@ -37,7 +36,7 @@ class InvalidPropertyTypeParameters(TypedDict): @dataclass -class InvalidPropertyType(PalantirRPCException): +class InvalidPropertyType(BadRequestError): name: Literal["InvalidPropertyType"] parameters: InvalidPropertyTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_property_value.py b/foundry/v1/ontologies/errors/_invalid_property_value.py index a1028d71b..d0a6dd43e 100644 --- a/foundry/v1/ontologies/errors/_invalid_property_value.py +++ b/foundry/v1/ontologies/errors/_invalid_property_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_value import PropertyValue from foundry.v1.ontologies.models._value_type import ValueType @@ -43,7 +42,7 @@ class InvalidPropertyValueParameters(TypedDict): @dataclass -class InvalidPropertyValue(PalantirRPCException): +class InvalidPropertyValue(BadRequestError): name: Literal["InvalidPropertyValue"] parameters: InvalidPropertyValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_query_parameter_value.py b/foundry/v1/ontologies/errors/_invalid_query_parameter_value.py index 3ac4f83a4..c007dad3d 100644 --- a/foundry/v1/ontologies/errors/_invalid_query_parameter_value.py +++ b/foundry/v1/ontologies/errors/_invalid_query_parameter_value.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._data_value import DataValue from foundry.v1.ontologies.models._parameter_id import ParameterId from foundry.v1.ontologies.models._query_data_type_dict import QueryDataTypeDict @@ -44,7 +43,7 @@ class InvalidQueryParameterValueParameters(TypedDict): @dataclass -class InvalidQueryParameterValue(PalantirRPCException): +class InvalidQueryParameterValue(BadRequestError): name: Literal["InvalidQueryParameterValue"] parameters: InvalidQueryParameterValueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_range_query.py b/foundry/v1/ontologies/errors/_invalid_range_query.py index e06ccfca8..b946ed858 100644 --- a/foundry/v1/ontologies/errors/_invalid_range_query.py +++ b/foundry/v1/ontologies/errors/_invalid_range_query.py @@ -19,11 +19,10 @@ from typing import Any from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidRangeQueryParameters(TypedDict): @@ -33,21 +32,17 @@ class InvalidRangeQueryParameters(TypedDict): lt: NotRequired[Any] """Less than""" - gt: NotRequired[Any] """Greater than""" - lte: NotRequired[Any] """Less than or equal""" - gte: NotRequired[Any] """Greater than or equal""" - field: str @dataclass -class InvalidRangeQuery(PalantirRPCException): +class InvalidRangeQuery(BadRequestError): name: Literal["InvalidRangeQuery"] parameters: InvalidRangeQueryParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_sort_order.py b/foundry/v1/ontologies/errors/_invalid_sort_order.py index 0fcbaa41d..ed837d289 100644 --- a/foundry/v1/ontologies/errors/_invalid_sort_order.py +++ b/foundry/v1/ontologies/errors/_invalid_sort_order.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidSortOrderParameters(TypedDict): @@ -36,7 +35,7 @@ class InvalidSortOrderParameters(TypedDict): @dataclass -class InvalidSortOrder(PalantirRPCException): +class InvalidSortOrder(BadRequestError): name: Literal["InvalidSortOrder"] parameters: InvalidSortOrderParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_sort_type.py b/foundry/v1/ontologies/errors/_invalid_sort_type.py index fc63bb8ac..df2507052 100644 --- a/foundry/v1/ontologies/errors/_invalid_sort_type.py +++ b/foundry/v1/ontologies/errors/_invalid_sort_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidSortTypeParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidSortTypeParameters(TypedDict): @dataclass -class InvalidSortType(PalantirRPCException): +class InvalidSortType(BadRequestError): name: Literal["InvalidSortType"] parameters: InvalidSortTypeParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_invalid_user_id.py b/foundry/v1/ontologies/errors/_invalid_user_id.py index 385e36153..ea9d5a46a 100644 --- a/foundry/v1/ontologies/errors/_invalid_user_id.py +++ b/foundry/v1/ontologies/errors/_invalid_user_id.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidUserIdParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidUserIdParameters(TypedDict): @dataclass -class InvalidUserId(PalantirRPCException): +class InvalidUserId(BadRequestError): name: Literal["InvalidUserId"] parameters: InvalidUserIdParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_link_already_exists.py b/foundry/v1/ontologies/errors/_link_already_exists.py index 57100cdd8..2ffd723fd 100644 --- a/foundry/v1/ontologies/errors/_link_already_exists.py +++ b/foundry/v1/ontologies/errors/_link_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class LinkAlreadyExistsParameters(TypedDict): @@ -31,7 +30,7 @@ class LinkAlreadyExistsParameters(TypedDict): @dataclass -class LinkAlreadyExists(PalantirRPCException): +class LinkAlreadyExists(ConflictError): name: Literal["LinkAlreadyExists"] parameters: LinkAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_link_type_not_found.py b/foundry/v1/ontologies/errors/_link_type_not_found.py index 0ad8d74cd..95b2a82dd 100644 --- a/foundry/v1/ontologies/errors/_link_type_not_found.py +++ b/foundry/v1/ontologies/errors/_link_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class LinkTypeNotFoundParameters(TypedDict): @dataclass -class LinkTypeNotFound(PalantirRPCException): +class LinkTypeNotFound(NotFoundError): name: Literal["LinkTypeNotFound"] parameters: LinkTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_linked_object_not_found.py b/foundry/v1/ontologies/errors/_linked_object_not_found.py index 821cbf7ca..077efd362 100644 --- a/foundry/v1/ontologies/errors/_linked_object_not_found.py +++ b/foundry/v1/ontologies/errors/_linked_object_not_found.py @@ -19,10 +19,9 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._primary_key_value import PrimaryKeyValue @@ -42,7 +41,7 @@ class LinkedObjectNotFoundParameters(TypedDict): @dataclass -class LinkedObjectNotFound(PalantirRPCException): +class LinkedObjectNotFound(NotFoundError): name: Literal["LinkedObjectNotFound"] parameters: LinkedObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_malformed_property_filters.py b/foundry/v1/ontologies/errors/_malformed_property_filters.py index 3ef917c83..65cded870 100644 --- a/foundry/v1/ontologies/errors/_malformed_property_filters.py +++ b/foundry/v1/ontologies/errors/_malformed_property_filters.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MalformedPropertyFiltersParameters(TypedDict): @@ -33,7 +32,7 @@ class MalformedPropertyFiltersParameters(TypedDict): @dataclass -class MalformedPropertyFilters(PalantirRPCException): +class MalformedPropertyFilters(BadRequestError): name: Literal["MalformedPropertyFilters"] parameters: MalformedPropertyFiltersParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_marketplace_action_mapping_not_found.py b/foundry/v1/ontologies/errors/_marketplace_action_mapping_not_found.py index cd6079830..71057beb0 100644 --- a/foundry/v1/ontologies/errors/_marketplace_action_mapping_not_found.py +++ b/foundry/v1/ontologies/errors/_marketplace_action_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v1.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v1.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceActionMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceActionMappingNotFound(PalantirRPCException): +class MarketplaceActionMappingNotFound(NotFoundError): name: Literal["MarketplaceActionMappingNotFound"] parameters: MarketplaceActionMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_marketplace_installation_not_found.py b/foundry/v1/ontologies/errors/_marketplace_installation_not_found.py index ffab88139..5e17313b1 100644 --- a/foundry/v1/ontologies/errors/_marketplace_installation_not_found.py +++ b/foundry/v1/ontologies/errors/_marketplace_installation_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v1.ontologies.models._sdk_package_name import SdkPackageName @@ -37,7 +36,7 @@ class MarketplaceInstallationNotFoundParameters(TypedDict): @dataclass -class MarketplaceInstallationNotFound(PalantirRPCException): +class MarketplaceInstallationNotFound(NotFoundError): name: Literal["MarketplaceInstallationNotFound"] parameters: MarketplaceInstallationNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_marketplace_link_mapping_not_found.py b/foundry/v1/ontologies/errors/_marketplace_link_mapping_not_found.py index cd303a6e6..63e7d2c42 100644 --- a/foundry/v1/ontologies/errors/_marketplace_link_mapping_not_found.py +++ b/foundry/v1/ontologies/errors/_marketplace_link_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v1.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v1.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceLinkMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceLinkMappingNotFound(PalantirRPCException): +class MarketplaceLinkMappingNotFound(NotFoundError): name: Literal["MarketplaceLinkMappingNotFound"] parameters: MarketplaceLinkMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_marketplace_object_mapping_not_found.py b/foundry/v1/ontologies/errors/_marketplace_object_mapping_not_found.py index 55acb4b9c..c35d1faaf 100644 --- a/foundry/v1/ontologies/errors/_marketplace_object_mapping_not_found.py +++ b/foundry/v1/ontologies/errors/_marketplace_object_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceObjectMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceObjectMappingNotFound(PalantirRPCException): +class MarketplaceObjectMappingNotFound(NotFoundError): name: Literal["MarketplaceObjectMappingNotFound"] parameters: MarketplaceObjectMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_marketplace_query_mapping_not_found.py b/foundry/v1/ontologies/errors/_marketplace_query_mapping_not_found.py index 0854348c8..9858bac9f 100644 --- a/foundry/v1/ontologies/errors/_marketplace_query_mapping_not_found.py +++ b/foundry/v1/ontologies/errors/_marketplace_query_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v1.ontologies.models._query_api_name import QueryApiName from foundry.v1.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceQueryMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceQueryMappingNotFound(PalantirRPCException): +class MarketplaceQueryMappingNotFound(NotFoundError): name: Literal["MarketplaceQueryMappingNotFound"] parameters: MarketplaceQueryMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_missing_parameter.py b/foundry/v1/ontologies/errors/_missing_parameter.py index 684c8142d..b08d5b5c2 100644 --- a/foundry/v1/ontologies/errors/_missing_parameter.py +++ b/foundry/v1/ontologies/errors/_missing_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -38,7 +37,7 @@ class MissingParameterParameters(TypedDict): @dataclass -class MissingParameter(PalantirRPCException): +class MissingParameter(BadRequestError): name: Literal["MissingParameter"] parameters: MissingParameterParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_multiple_group_by_on_field_not_supported.py b/foundry/v1/ontologies/errors/_multiple_group_by_on_field_not_supported.py index d4b237044..7a1eebe33 100644 --- a/foundry/v1/ontologies/errors/_multiple_group_by_on_field_not_supported.py +++ b/foundry/v1/ontologies/errors/_multiple_group_by_on_field_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MultipleGroupByOnFieldNotSupportedParameters(TypedDict): @@ -34,7 +33,7 @@ class MultipleGroupByOnFieldNotSupportedParameters(TypedDict): @dataclass -class MultipleGroupByOnFieldNotSupported(PalantirRPCException): +class MultipleGroupByOnFieldNotSupported(BadRequestError): name: Literal["MultipleGroupByOnFieldNotSupported"] parameters: MultipleGroupByOnFieldNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_multiple_property_values_not_supported.py b/foundry/v1/ontologies/errors/_multiple_property_values_not_supported.py index 09cac5731..f8fcf2c4d 100644 --- a/foundry/v1/ontologies/errors/_multiple_property_values_not_supported.py +++ b/foundry/v1/ontologies/errors/_multiple_property_values_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_filter import PropertyFilter @@ -40,7 +39,7 @@ class MultiplePropertyValuesNotSupportedParameters(TypedDict): @dataclass -class MultiplePropertyValuesNotSupported(PalantirRPCException): +class MultiplePropertyValuesNotSupported(BadRequestError): name: Literal["MultiplePropertyValuesNotSupported"] parameters: MultiplePropertyValuesNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_already_exists.py b/foundry/v1/ontologies/errors/_object_already_exists.py index e0c458043..17694bd5e 100644 --- a/foundry/v1/ontologies/errors/_object_already_exists.py +++ b/foundry/v1/ontologies/errors/_object_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ObjectAlreadyExistsParameters(TypedDict): @@ -31,7 +30,7 @@ class ObjectAlreadyExistsParameters(TypedDict): @dataclass -class ObjectAlreadyExists(PalantirRPCException): +class ObjectAlreadyExists(ConflictError): name: Literal["ObjectAlreadyExists"] parameters: ObjectAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_changed.py b/foundry/v1/ontologies/errors/_object_changed.py index 8beb13d05..2dff4b34a 100644 --- a/foundry/v1/ontologies/errors/_object_changed.py +++ b/foundry/v1/ontologies/errors/_object_changed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ObjectChangedParameters(TypedDict): @@ -31,7 +30,7 @@ class ObjectChangedParameters(TypedDict): @dataclass -class ObjectChanged(PalantirRPCException): +class ObjectChanged(ConflictError): name: Literal["ObjectChanged"] parameters: ObjectChangedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_not_found.py b/foundry/v1/ontologies/errors/_object_not_found.py index 6c6b57ae7..806d39b8f 100644 --- a/foundry/v1/ontologies/errors/_object_not_found.py +++ b/foundry/v1/ontologies/errors/_object_not_found.py @@ -19,11 +19,10 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._primary_key_value import PrimaryKeyValue from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -40,7 +39,7 @@ class ObjectNotFoundParameters(TypedDict): @dataclass -class ObjectNotFound(PalantirRPCException): +class ObjectNotFound(NotFoundError): name: Literal["ObjectNotFound"] parameters: ObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_set_not_found.py b/foundry/v1/ontologies/errors/_object_set_not_found.py index d98e1bc8c..15b6e67ca 100644 --- a/foundry/v1/ontologies/errors/_object_set_not_found.py +++ b/foundry/v1/ontologies/errors/_object_set_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_set_rid import ObjectSetRid @@ -34,7 +33,7 @@ class ObjectSetNotFoundParameters(TypedDict): @dataclass -class ObjectSetNotFound(PalantirRPCException): +class ObjectSetNotFound(NotFoundError): name: Literal["ObjectSetNotFound"] parameters: ObjectSetNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_type_not_found.py b/foundry/v1/ontologies/errors/_object_type_not_found.py index 08370e8b9..d9beca54b 100644 --- a/foundry/v1/ontologies/errors/_object_type_not_found.py +++ b/foundry/v1/ontologies/errors/_object_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._object_type_rid import ObjectTypeRid @@ -38,7 +37,7 @@ class ObjectTypeNotFoundParameters(TypedDict): @dataclass -class ObjectTypeNotFound(PalantirRPCException): +class ObjectTypeNotFound(NotFoundError): name: Literal["ObjectTypeNotFound"] parameters: ObjectTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_type_not_synced.py b/foundry/v1/ontologies/errors/_object_type_not_synced.py index 23d459581..373b09193 100644 --- a/foundry/v1/ontologies/errors/_object_type_not_synced.py +++ b/foundry/v1/ontologies/errors/_object_type_not_synced.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class ObjectTypeNotSyncedParameters(TypedDict): @dataclass -class ObjectTypeNotSynced(PalantirRPCException): +class ObjectTypeNotSynced(ConflictError): name: Literal["ObjectTypeNotSynced"] parameters: ObjectTypeNotSyncedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_object_types_not_synced.py b/foundry/v1/ontologies/errors/_object_types_not_synced.py index 5288f562a..664ee8ad2 100644 --- a/foundry/v1/ontologies/errors/_object_types_not_synced.py +++ b/foundry/v1/ontologies/errors/_object_types_not_synced.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -38,7 +37,7 @@ class ObjectTypesNotSyncedParameters(TypedDict): @dataclass -class ObjectTypesNotSynced(PalantirRPCException): +class ObjectTypesNotSynced(ConflictError): name: Literal["ObjectTypesNotSynced"] parameters: ObjectTypesNotSyncedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_objects_exceeded_limit.py b/foundry/v1/ontologies/errors/_objects_exceeded_limit.py index 17c2bf01a..5a1988db9 100644 --- a/foundry/v1/ontologies/errors/_objects_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_objects_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ObjectsExceededLimitParameters(TypedDict): @@ -34,7 +33,7 @@ class ObjectsExceededLimitParameters(TypedDict): @dataclass -class ObjectsExceededLimit(PalantirRPCException): +class ObjectsExceededLimit(BadRequestError): name: Literal["ObjectsExceededLimit"] parameters: ObjectsExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_ontology_api_name_not_unique.py b/foundry/v1/ontologies/errors/_ontology_api_name_not_unique.py index fe772044a..0a075bcd6 100644 --- a/foundry/v1/ontologies/errors/_ontology_api_name_not_unique.py +++ b/foundry/v1/ontologies/errors/_ontology_api_name_not_unique.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._ontology_api_name import OntologyApiName @@ -34,7 +33,7 @@ class OntologyApiNameNotUniqueParameters(TypedDict): @dataclass -class OntologyApiNameNotUnique(PalantirRPCException): +class OntologyApiNameNotUnique(BadRequestError): name: Literal["OntologyApiNameNotUnique"] parameters: OntologyApiNameNotUniqueParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_ontology_edits_exceeded_limit.py b/foundry/v1/ontologies/errors/_ontology_edits_exceeded_limit.py index c57ae7d62..83c0dab3d 100644 --- a/foundry/v1/ontologies/errors/_ontology_edits_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_ontology_edits_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class OntologyEditsExceededLimitParameters(TypedDict): @@ -39,7 +38,7 @@ class OntologyEditsExceededLimitParameters(TypedDict): @dataclass -class OntologyEditsExceededLimit(PalantirRPCException): +class OntologyEditsExceededLimit(BadRequestError): name: Literal["OntologyEditsExceededLimit"] parameters: OntologyEditsExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_ontology_not_found.py b/foundry/v1/ontologies/errors/_ontology_not_found.py index ee6d376ab..2045c20fb 100644 --- a/foundry/v1/ontologies/errors/_ontology_not_found.py +++ b/foundry/v1/ontologies/errors/_ontology_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._ontology_api_name import OntologyApiName from foundry.v1.ontologies.models._ontology_rid import OntologyRid @@ -38,7 +37,7 @@ class OntologyNotFoundParameters(TypedDict): @dataclass -class OntologyNotFound(PalantirRPCException): +class OntologyNotFound(NotFoundError): name: Literal["OntologyNotFound"] parameters: OntologyNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_ontology_syncing.py b/foundry/v1/ontologies/errors/_ontology_syncing.py index b4b892d06..2c9611c1a 100644 --- a/foundry/v1/ontologies/errors/_ontology_syncing.py +++ b/foundry/v1/ontologies/errors/_ontology_syncing.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class OntologySyncingParameters(TypedDict): @dataclass -class OntologySyncing(PalantirRPCException): +class OntologySyncing(ConflictError): name: Literal["OntologySyncing"] parameters: OntologySyncingParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_ontology_syncing_object_types.py b/foundry/v1/ontologies/errors/_ontology_syncing_object_types.py index 01d5e4e07..847c02128 100644 --- a/foundry/v1/ontologies/errors/_ontology_syncing_object_types.py +++ b/foundry/v1/ontologies/errors/_ontology_syncing_object_types.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -38,7 +37,7 @@ class OntologySyncingObjectTypesParameters(TypedDict): @dataclass -class OntologySyncingObjectTypes(PalantirRPCException): +class OntologySyncingObjectTypes(ConflictError): name: Literal["OntologySyncingObjectTypes"] parameters: OntologySyncingObjectTypesParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_parameter_object_not_found.py b/foundry/v1/ontologies/errors/_parameter_object_not_found.py index e4899d1b9..fdbe204aa 100644 --- a/foundry/v1/ontologies/errors/_parameter_object_not_found.py +++ b/foundry/v1/ontologies/errors/_parameter_object_not_found.py @@ -19,10 +19,9 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._primary_key_value import PrimaryKeyValue from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class ParameterObjectNotFoundParameters(TypedDict): @dataclass -class ParameterObjectNotFound(PalantirRPCException): +class ParameterObjectNotFound(NotFoundError): name: Literal["ParameterObjectNotFound"] parameters: ParameterObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_parameter_object_set_rid_not_found.py b/foundry/v1/ontologies/errors/_parameter_object_set_rid_not_found.py index 94bb6f28b..b358e2eec 100644 --- a/foundry/v1/ontologies/errors/_parameter_object_set_rid_not_found.py +++ b/foundry/v1/ontologies/errors/_parameter_object_set_rid_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError class ParameterObjectSetRidNotFoundParameters(TypedDict): @@ -34,7 +33,7 @@ class ParameterObjectSetRidNotFoundParameters(TypedDict): @dataclass -class ParameterObjectSetRidNotFound(PalantirRPCException): +class ParameterObjectSetRidNotFound(NotFoundError): name: Literal["ParameterObjectSetRidNotFound"] parameters: ParameterObjectSetRidNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_parameter_type_not_supported.py b/foundry/v1/ontologies/errors/_parameter_type_not_supported.py index 4dea40b3e..d844d90b8 100644 --- a/foundry/v1/ontologies/errors/_parameter_type_not_supported.py +++ b/foundry/v1/ontologies/errors/_parameter_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._parameter_id import ParameterId from foundry.v1.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class ParameterTypeNotSupportedParameters(TypedDict): @dataclass -class ParameterTypeNotSupported(PalantirRPCException): +class ParameterTypeNotSupported(BadRequestError): name: Literal["ParameterTypeNotSupported"] parameters: ParameterTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_parameters_not_found.py b/foundry/v1/ontologies/errors/_parameters_not_found.py index 525eec0d7..3f4f3434c 100644 --- a/foundry/v1/ontologies/errors/_parameters_not_found.py +++ b/foundry/v1/ontologies/errors/_parameters_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -43,7 +42,7 @@ class ParametersNotFoundParameters(TypedDict): @dataclass -class ParametersNotFound(PalantirRPCException): +class ParametersNotFound(BadRequestError): name: Literal["ParametersNotFound"] parameters: ParametersNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_parent_attachment_permission_denied.py b/foundry/v1/ontologies/errors/_parent_attachment_permission_denied.py index ea7e08589..8abb782f6 100644 --- a/foundry/v1/ontologies/errors/_parent_attachment_permission_denied.py +++ b/foundry/v1/ontologies/errors/_parent_attachment_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class ParentAttachmentPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class ParentAttachmentPermissionDeniedParameters(TypedDict): @dataclass -class ParentAttachmentPermissionDenied(PalantirRPCException): +class ParentAttachmentPermissionDenied(PermissionDeniedError): name: Literal["ParentAttachmentPermissionDenied"] parameters: ParentAttachmentPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_properties_have_different_ids.py b/foundry/v1/ontologies/errors/_properties_have_different_ids.py index d119b3fcf..3e569ebc3 100644 --- a/foundry/v1/ontologies/errors/_properties_have_different_ids.py +++ b/foundry/v1/ontologies/errors/_properties_have_different_ids.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, ) # NOQA @@ -37,7 +36,7 @@ class PropertiesHaveDifferentIdsParameters(TypedDict): @dataclass -class PropertiesHaveDifferentIds(PalantirRPCException): +class PropertiesHaveDifferentIds(BadRequestError): name: Literal["PropertiesHaveDifferentIds"] parameters: PropertiesHaveDifferentIdsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_properties_not_filterable.py b/foundry/v1/ontologies/errors/_properties_not_filterable.py index ed077f1b9..6c301ac39 100644 --- a/foundry/v1/ontologies/errors/_properties_not_filterable.py +++ b/foundry/v1/ontologies/errors/_properties_not_filterable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotFilterableParameters(TypedDict): @dataclass -class PropertiesNotFilterable(PalantirRPCException): +class PropertiesNotFilterable(BadRequestError): name: Literal["PropertiesNotFilterable"] parameters: PropertiesNotFilterableParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_properties_not_found.py b/foundry/v1/ontologies/errors/_properties_not_found.py index 1d6763348..21cb5e36f 100644 --- a/foundry/v1/ontologies/errors/_properties_not_found.py +++ b/foundry/v1/ontologies/errors/_properties_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -38,7 +37,7 @@ class PropertiesNotFoundParameters(TypedDict): @dataclass -class PropertiesNotFound(PalantirRPCException): +class PropertiesNotFound(NotFoundError): name: Literal["PropertiesNotFound"] parameters: PropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_properties_not_searchable.py b/foundry/v1/ontologies/errors/_properties_not_searchable.py index 50c158efc..7c308e707 100644 --- a/foundry/v1/ontologies/errors/_properties_not_searchable.py +++ b/foundry/v1/ontologies/errors/_properties_not_searchable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotSearchableParameters(TypedDict): @dataclass -class PropertiesNotSearchable(PalantirRPCException): +class PropertiesNotSearchable(BadRequestError): name: Literal["PropertiesNotSearchable"] parameters: PropertiesNotSearchableParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_properties_not_sortable.py b/foundry/v1/ontologies/errors/_properties_not_sortable.py index 9c1c41fb7..838d5513f 100644 --- a/foundry/v1/ontologies/errors/_properties_not_sortable.py +++ b/foundry/v1/ontologies/errors/_properties_not_sortable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotSortableParameters(TypedDict): @dataclass -class PropertiesNotSortable(PalantirRPCException): +class PropertiesNotSortable(BadRequestError): name: Literal["PropertiesNotSortable"] parameters: PropertiesNotSortableParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_api_name_not_found.py b/foundry/v1/ontologies/errors/_property_api_name_not_found.py index 386ca3f6b..79c43b599 100644 --- a/foundry/v1/ontologies/errors/_property_api_name_not_found.py +++ b/foundry/v1/ontologies/errors/_property_api_name_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_id import PropertyId from foundry.v1.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class PropertyApiNameNotFoundParameters(TypedDict): @dataclass -class PropertyApiNameNotFound(PalantirRPCException): +class PropertyApiNameNotFound(BadRequestError): name: Literal["PropertyApiNameNotFound"] parameters: PropertyApiNameNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_base_type_not_supported.py b/foundry/v1/ontologies/errors/_property_base_type_not_supported.py index e85c9c3e8..6d1e40c02 100644 --- a/foundry/v1/ontologies/errors/_property_base_type_not_supported.py +++ b/foundry/v1/ontologies/errors/_property_base_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._value_type import ValueType @@ -43,7 +42,7 @@ class PropertyBaseTypeNotSupportedParameters(TypedDict): @dataclass -class PropertyBaseTypeNotSupported(PalantirRPCException): +class PropertyBaseTypeNotSupported(BadRequestError): name: Literal["PropertyBaseTypeNotSupported"] parameters: PropertyBaseTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_filters_not_supported.py b/foundry/v1/ontologies/errors/_property_filters_not_supported.py index 68ac8809f..6726adb45 100644 --- a/foundry/v1/ontologies/errors/_property_filters_not_supported.py +++ b/foundry/v1/ontologies/errors/_property_filters_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_filter import PropertyFilter @@ -41,7 +40,7 @@ class PropertyFiltersNotSupportedParameters(TypedDict): @dataclass -class PropertyFiltersNotSupported(PalantirRPCException): +class PropertyFiltersNotSupported(BadRequestError): name: Literal["PropertyFiltersNotSupported"] parameters: PropertyFiltersNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_not_found.py b/foundry/v1/ontologies/errors/_property_not_found.py index 17f0f6bc4..f1d361771 100644 --- a/foundry/v1/ontologies/errors/_property_not_found.py +++ b/foundry/v1/ontologies/errors/_property_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class PropertyNotFoundParameters(TypedDict): @@ -31,7 +30,7 @@ class PropertyNotFoundParameters(TypedDict): @dataclass -class PropertyNotFound(PalantirRPCException): +class PropertyNotFound(BadRequestError): name: Literal["PropertyNotFound"] parameters: PropertyNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py b/foundry/v1/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py index ca93f6ae0..a5b959618 100644 --- a/foundry/v1/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py +++ b/foundry/v1/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class PropertyTypeDoesNotSupportNearestNeighborsParameters(TypedDict): @@ -31,7 +30,7 @@ class PropertyTypeDoesNotSupportNearestNeighborsParameters(TypedDict): @dataclass -class PropertyTypeDoesNotSupportNearestNeighbors(PalantirRPCException): +class PropertyTypeDoesNotSupportNearestNeighbors(BadRequestError): name: Literal["PropertyTypeDoesNotSupportNearestNeighbors"] parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_type_not_found.py b/foundry/v1/ontologies/errors/_property_type_not_found.py index 3e3baa786..96f6d5f09 100644 --- a/foundry/v1/ontologies/errors/_property_type_not_found.py +++ b/foundry/v1/ontologies/errors/_property_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._property_api_name import PropertyApiName @@ -38,7 +37,7 @@ class PropertyTypeNotFoundParameters(TypedDict): @dataclass -class PropertyTypeNotFound(PalantirRPCException): +class PropertyTypeNotFound(NotFoundError): name: Literal["PropertyTypeNotFound"] parameters: PropertyTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_property_types_search_not_supported.py b/foundry/v1/ontologies/errors/_property_types_search_not_supported.py index b16f3733c..4ecfafaba 100644 --- a/foundry/v1/ontologies/errors/_property_types_search_not_supported.py +++ b/foundry/v1/ontologies/errors/_property_types_search_not_supported.py @@ -20,10 +20,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._property_api_name import PropertyApiName from foundry.v1.ontologies.models._property_filter import PropertyFilter @@ -40,7 +39,7 @@ class PropertyTypesSearchNotSupportedParameters(TypedDict): @dataclass -class PropertyTypesSearchNotSupported(PalantirRPCException): +class PropertyTypesSearchNotSupported(BadRequestError): name: Literal["PropertyTypesSearchNotSupported"] parameters: PropertyTypesSearchNotSupportedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_query_encountered_user_facing_error.py b/foundry/v1/ontologies/errors/_query_encountered_user_facing_error.py index 93a4a0b6d..6b7f941f4 100644 --- a/foundry/v1/ontologies/errors/_query_encountered_user_facing_error.py +++ b/foundry/v1/ontologies/errors/_query_encountered_user_facing_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -42,7 +41,7 @@ class QueryEncounteredUserFacingErrorParameters(TypedDict): @dataclass -class QueryEncounteredUserFacingError(PalantirRPCException): +class QueryEncounteredUserFacingError(ConflictError): name: Literal["QueryEncounteredUserFacingError"] parameters: QueryEncounteredUserFacingErrorParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_query_memory_exceeded_limit.py b/foundry/v1/ontologies/errors/_query_memory_exceeded_limit.py index 9694e9681..c26d715ef 100644 --- a/foundry/v1/ontologies/errors/_query_memory_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_query_memory_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryMemoryExceededLimitParameters(TypedDict): @dataclass -class QueryMemoryExceededLimit(PalantirRPCException): +class QueryMemoryExceededLimit(InternalServerError): name: Literal["QueryMemoryExceededLimit"] parameters: QueryMemoryExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_query_not_found.py b/foundry/v1/ontologies/errors/_query_not_found.py index b7db01ce0..b57d8dab5 100644 --- a/foundry/v1/ontologies/errors/_query_not_found.py +++ b/foundry/v1/ontologies/errors/_query_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._query_api_name import QueryApiName @@ -34,7 +33,7 @@ class QueryNotFoundParameters(TypedDict): @dataclass -class QueryNotFound(PalantirRPCException): +class QueryNotFound(NotFoundError): name: Literal["QueryNotFound"] parameters: QueryNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_query_runtime_error.py b/foundry/v1/ontologies/errors/_query_runtime_error.py index 215880f89..385377add 100644 --- a/foundry/v1/ontologies/errors/_query_runtime_error.py +++ b/foundry/v1/ontologies/errors/_query_runtime_error.py @@ -19,11 +19,10 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion from foundry.v1.ontologies.models._query_runtime_error_parameter import ( @@ -48,7 +47,7 @@ class QueryRuntimeErrorParameters(TypedDict): @dataclass -class QueryRuntimeError(PalantirRPCException): +class QueryRuntimeError(BadRequestError): name: Literal["QueryRuntimeError"] parameters: QueryRuntimeErrorParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_query_time_exceeded_limit.py b/foundry/v1/ontologies/errors/_query_time_exceeded_limit.py index 6cdda1da9..0b65ca986 100644 --- a/foundry/v1/ontologies/errors/_query_time_exceeded_limit.py +++ b/foundry/v1/ontologies/errors/_query_time_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v1.ontologies.models._function_rid import FunctionRid from foundry.v1.ontologies.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryTimeExceededLimitParameters(TypedDict): @dataclass -class QueryTimeExceededLimit(PalantirRPCException): +class QueryTimeExceededLimit(InternalServerError): name: Literal["QueryTimeExceededLimit"] parameters: QueryTimeExceededLimitParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_search_vector_dimensions_differ.py b/foundry/v1/ontologies/errors/_search_vector_dimensions_differ.py index 5c83e7546..6b26ba183 100644 --- a/foundry/v1/ontologies/errors/_search_vector_dimensions_differ.py +++ b/foundry/v1/ontologies/errors/_search_vector_dimensions_differ.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class SearchVectorDimensionsDifferParameters(TypedDict): @@ -31,7 +30,7 @@ class SearchVectorDimensionsDifferParameters(TypedDict): @dataclass -class SearchVectorDimensionsDiffer(PalantirRPCException): +class SearchVectorDimensionsDiffer(BadRequestError): name: Literal["SearchVectorDimensionsDiffer"] parameters: SearchVectorDimensionsDifferParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_shared_properties_not_found.py b/foundry/v1/ontologies/errors/_shared_properties_not_found.py index b478fa9f7..7c179f970 100644 --- a/foundry/v1/ontologies/errors/_shared_properties_not_found.py +++ b/foundry/v1/ontologies/errors/_shared_properties_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v1.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, @@ -40,7 +39,7 @@ class SharedPropertiesNotFoundParameters(TypedDict): @dataclass -class SharedPropertiesNotFound(PalantirRPCException): +class SharedPropertiesNotFound(NotFoundError): name: Literal["SharedPropertiesNotFound"] parameters: SharedPropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_shared_property_type_not_found.py b/foundry/v1/ontologies/errors/_shared_property_type_not_found.py index 727d72a0c..1b23e3f87 100644 --- a/foundry/v1/ontologies/errors/_shared_property_type_not_found.py +++ b/foundry/v1/ontologies/errors/_shared_property_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v1.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, ) # NOQA @@ -40,7 +39,7 @@ class SharedPropertyTypeNotFoundParameters(TypedDict): @dataclass -class SharedPropertyTypeNotFound(PalantirRPCException): +class SharedPropertyTypeNotFound(NotFoundError): name: Literal["SharedPropertyTypeNotFound"] parameters: SharedPropertyTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_too_many_nearest_neighbors_requested.py b/foundry/v1/ontologies/errors/_too_many_nearest_neighbors_requested.py index 711d69962..3935dd3bc 100644 --- a/foundry/v1/ontologies/errors/_too_many_nearest_neighbors_requested.py +++ b/foundry/v1/ontologies/errors/_too_many_nearest_neighbors_requested.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class TooManyNearestNeighborsRequestedParameters(TypedDict): @@ -31,7 +30,7 @@ class TooManyNearestNeighborsRequestedParameters(TypedDict): @dataclass -class TooManyNearestNeighborsRequested(PalantirRPCException): +class TooManyNearestNeighborsRequested(BadRequestError): name: Literal["TooManyNearestNeighborsRequested"] parameters: TooManyNearestNeighborsRequestedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_unknown_parameter.py b/foundry/v1/ontologies/errors/_unknown_parameter.py index dbd70b7a2..6c2d8a671 100644 --- a/foundry/v1/ontologies/errors/_unknown_parameter.py +++ b/foundry/v1/ontologies/errors/_unknown_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v1.ontologies.models._parameter_id import ParameterId @@ -40,7 +39,7 @@ class UnknownParameterParameters(TypedDict): @dataclass -class UnknownParameter(PalantirRPCException): +class UnknownParameter(BadRequestError): name: Literal["UnknownParameter"] parameters: UnknownParameterParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_unsupported_object_set.py b/foundry/v1/ontologies/errors/_unsupported_object_set.py index b472b0c63..2d6260bcb 100644 --- a/foundry/v1/ontologies/errors/_unsupported_object_set.py +++ b/foundry/v1/ontologies/errors/_unsupported_object_set.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class UnsupportedObjectSetParameters(TypedDict): @@ -31,7 +30,7 @@ class UnsupportedObjectSetParameters(TypedDict): @dataclass -class UnsupportedObjectSet(PalantirRPCException): +class UnsupportedObjectSet(BadRequestError): name: Literal["UnsupportedObjectSet"] parameters: UnsupportedObjectSetParameters error_instance_id: str diff --git a/foundry/v1/ontologies/errors/_view_object_permission_denied.py b/foundry/v1/ontologies/errors/_view_object_permission_denied.py index 49cb11f22..ab6912001 100644 --- a/foundry/v1/ontologies/errors/_view_object_permission_denied.py +++ b/foundry/v1/ontologies/errors/_view_object_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v1.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class ViewObjectPermissionDeniedParameters(TypedDict): @dataclass -class ViewObjectPermissionDenied(PalantirRPCException): +class ViewObjectPermissionDenied(PermissionDeniedError): name: Literal["ViewObjectPermissionDenied"] parameters: ViewObjectPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v1/ontologies/models/__init__.py b/foundry/v1/ontologies/models/__init__.py index 79ebc0a27..434e9b305 100644 --- a/foundry/v1/ontologies/models/__init__.py +++ b/foundry/v1/ontologies/models/__init__.py @@ -292,6 +292,7 @@ QueryAggregationValueTypeDict, ) # NOQA from foundry.v1.ontologies.models._query_api_name import QueryApiName +from foundry.v1.ontologies.models._query_data_type_dict import EntrySetTypeDict from foundry.v1.ontologies.models._query_data_type_dict import QueryArrayTypeDict from foundry.v1.ontologies.models._query_data_type_dict import QueryDataTypeDict from foundry.v1.ontologies.models._query_data_type_dict import QuerySetTypeDict @@ -435,6 +436,7 @@ "DeleteObjectRuleDict", "DerivedPropertyApiName", "Duration", + "EntrySetTypeDict", "EqualsQuery", "EqualsQueryDict", "ExecuteQueryResponse", diff --git a/foundry/v1/ontologies/models/_data_value.py b/foundry/v1/ontologies/models/_data_value.py index b9a76367b..b8807cfec 100644 --- a/foundry/v1/ontologies/models/_data_value.py +++ b/foundry/v1/ontologies/models/_data_value.py @@ -29,8 +29,9 @@ | CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | | Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Marking | string | `"MU"` | diff --git a/foundry/v1/ontologies/models/_query_data_type_dict.py b/foundry/v1/ontologies/models/_query_data_type_dict.py index 4a73c25f7..dcc1028b9 100644 --- a/foundry/v1/ontologies/models/_query_data_type_dict.py +++ b/foundry/v1/ontologies/models/_query_data_type_dict.py @@ -77,6 +77,18 @@ class QuerySetTypeDict(TypedDict): type: Literal["set"] +class EntrySetTypeDict(TypedDict): + """EntrySetType""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + keyType: QueryDataTypeDict + + valueType: QueryDataTypeDict + + type: Literal["entrySet"] + + class QueryUnionTypeDict(TypedDict): """QueryUnionType""" @@ -103,6 +115,7 @@ class QueryArrayTypeDict(TypedDict): QueryStructTypeDict, QuerySetTypeDict, StringTypeDict, + EntrySetTypeDict, DoubleTypeDict, IntegerTypeDict, ThreeDimensionalAggregationDict, diff --git a/foundry/v1/ontologies/object_type.py b/foundry/v1/ontologies/object_type.py index fb150110a..74538abef 100644 --- a/foundry/v1/ontologies/object_type.py +++ b/foundry/v1/ontologies/object_type.py @@ -107,6 +107,7 @@ def get( body_type=None, response_type=ObjectType, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -156,6 +157,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSide, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -209,6 +211,7 @@ def list( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -263,6 +266,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -322,6 +326,7 @@ def page( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -382,6 +387,7 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -444,6 +450,7 @@ def get( body_type=None, response_type=ObjectType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -493,6 +500,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSide, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -546,6 +554,7 @@ def list( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -600,6 +609,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -659,6 +669,7 @@ def page( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -719,6 +730,7 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -781,6 +793,7 @@ def get( body_type=None, response_type=ObjectType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -830,6 +843,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSide, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -883,6 +897,7 @@ def list( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -937,6 +952,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -996,6 +1012,7 @@ def page( body_type=None, response_type=ListObjectTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1056,5 +1073,6 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/ontology.py b/foundry/v1/ontologies/ontology.py index ed0a7f59c..55f662f44 100644 --- a/foundry/v1/ontologies/ontology.py +++ b/foundry/v1/ontologies/ontology.py @@ -99,6 +99,7 @@ def get( body_type=None, response_type=Ontology, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -134,6 +135,7 @@ def list( body_type=None, response_type=ListOntologiesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -192,6 +194,7 @@ def get( body_type=None, response_type=Ontology, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -227,6 +230,7 @@ def list( body_type=None, response_type=ListOntologiesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -285,6 +289,7 @@ def get( body_type=None, response_type=Ontology, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -320,5 +325,6 @@ def list( body_type=None, response_type=ListOntologiesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/ontology_object.py b/foundry/v1/ontologies/ontology_object.py index 300ab029f..81e6c9834 100644 --- a/foundry/v1/ontologies/ontology_object.py +++ b/foundry/v1/ontologies/ontology_object.py @@ -150,6 +150,7 @@ def aggregate( ), response_type=AggregateObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -203,6 +204,7 @@ def get( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -265,6 +267,7 @@ def get_linked_object( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -341,6 +344,7 @@ def list( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -425,6 +429,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -507,6 +512,7 @@ def page( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -597,6 +603,7 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -693,6 +700,7 @@ def search( ), response_type=SearchObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -776,6 +784,7 @@ def aggregate( ), response_type=AggregateObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -829,6 +838,7 @@ def get( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -891,6 +901,7 @@ def get_linked_object( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -967,6 +978,7 @@ def list( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1051,6 +1063,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1133,6 +1146,7 @@ def page( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1223,6 +1237,7 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1319,6 +1334,7 @@ def search( ), response_type=SearchObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1402,6 +1418,7 @@ def aggregate( ), response_type=AggregateObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1455,6 +1472,7 @@ def get( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1517,6 +1535,7 @@ def get_linked_object( body_type=None, response_type=OntologyObject, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1593,6 +1612,7 @@ def list( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1677,6 +1697,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1759,6 +1780,7 @@ def page( body_type=None, response_type=ListObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1849,6 +1871,7 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1945,5 +1968,6 @@ def search( ), response_type=SearchObjectsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/query.py b/foundry/v1/ontologies/query.py index 07f783ad7..3cf7d27ff 100644 --- a/foundry/v1/ontologies/query.py +++ b/foundry/v1/ontologies/query.py @@ -111,6 +111,7 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -184,6 +185,7 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -257,5 +259,6 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v1/ontologies/query_type.py b/foundry/v1/ontologies/query_type.py index 372e9a0d9..5d43fc378 100644 --- a/foundry/v1/ontologies/query_type.py +++ b/foundry/v1/ontologies/query_type.py @@ -102,6 +102,7 @@ def get( body_type=None, response_type=QueryType, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -154,6 +155,7 @@ def list( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -212,6 +214,7 @@ def page( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -274,6 +277,7 @@ def get( body_type=None, response_type=QueryType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -326,6 +330,7 @@ def list( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -384,6 +389,7 @@ def page( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -446,6 +452,7 @@ def get( body_type=None, response_type=QueryType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -498,6 +505,7 @@ def list( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -556,5 +564,6 @@ def page( body_type=None, response_type=ListQueryTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/admin/enrollment.py b/foundry/v2/admin/enrollment.py index 6b4ca8f78..5ea819bdd 100644 --- a/foundry/v2/admin/enrollment.py +++ b/foundry/v2/admin/enrollment.py @@ -30,6 +30,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.host import HostClient from foundry.v2.admin.models._enrollment import Enrollment from foundry.v2.core.models._enrollment_rid import EnrollmentRid @@ -78,6 +79,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Enrollment + + :raises EnrollmentNotFound: The given Enrollment could not be found. """ return self._api_client.call_api( @@ -97,6 +100,9 @@ def get( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, ), ).decode() @@ -118,6 +124,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Enrollment + + :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. """ return self._api_client.call_api( @@ -135,6 +143,9 @@ def get_current( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, + }, ), ).decode() @@ -176,6 +187,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Enrollment] + + :raises EnrollmentNotFound: The given Enrollment could not be found. """ return self._api_client.call_api( @@ -195,6 +208,9 @@ def get( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, ), ) @@ -216,6 +232,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Enrollment] + + :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. """ return self._api_client.call_api( @@ -233,6 +251,9 @@ def get_current( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, + }, ), ) @@ -274,6 +295,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Enrollment] + + :raises EnrollmentNotFound: The given Enrollment could not be found. """ return self._api_client.stream_api( @@ -293,6 +316,9 @@ def get( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "EnrollmentNotFound": admin_errors.EnrollmentNotFound, + }, ), ) @@ -314,6 +340,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Enrollment] + + :raises GetCurrentEnrollmentPermissionDenied: Could not getCurrent the Enrollment. """ return self._api_client.stream_api( @@ -331,5 +359,8 @@ def get_current( body_type=None, response_type=Enrollment, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentEnrollmentPermissionDenied": admin_errors.GetCurrentEnrollmentPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/errors/_add_group_members_permission_denied.py b/foundry/v2/admin/errors/_add_group_members_permission_denied.py index 5939ee9cb..f970c95c0 100644 --- a/foundry/v2/admin/errors/_add_group_members_permission_denied.py +++ b/foundry/v2/admin/errors/_add_group_members_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class AddGroupMembersPermissionDeniedParameters(TypedDict): @dataclass -class AddGroupMembersPermissionDenied(PalantirRPCException): +class AddGroupMembersPermissionDenied(PermissionDeniedError): name: Literal["AddGroupMembersPermissionDenied"] parameters: AddGroupMembersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_add_marking_members_permission_denied.py b/foundry/v2/admin/errors/_add_marking_members_permission_denied.py index 6156d8468..2c00d8cd3 100644 --- a/foundry/v2/admin/errors/_add_marking_members_permission_denied.py +++ b/foundry/v2/admin/errors/_add_marking_members_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class AddMarkingMembersPermissionDeniedParameters(TypedDict): @dataclass -class AddMarkingMembersPermissionDenied(PalantirRPCException): +class AddMarkingMembersPermissionDenied(PermissionDeniedError): name: Literal["AddMarkingMembersPermissionDenied"] parameters: AddMarkingMembersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_add_marking_role_assignments_permission_denied.py b/foundry/v2/admin/errors/_add_marking_role_assignments_permission_denied.py index 39cd8a543..e26f5fc67 100644 --- a/foundry/v2/admin/errors/_add_marking_role_assignments_permission_denied.py +++ b/foundry/v2/admin/errors/_add_marking_role_assignments_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class AddMarkingRoleAssignmentsPermissionDeniedParameters(TypedDict): @dataclass -class AddMarkingRoleAssignmentsPermissionDenied(PalantirRPCException): +class AddMarkingRoleAssignmentsPermissionDenied(PermissionDeniedError): name: Literal["AddMarkingRoleAssignmentsPermissionDenied"] parameters: AddMarkingRoleAssignmentsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_cannot_replace_provider_info_for_principal_in_protected_realm.py b/foundry/v2/admin/errors/_cannot_replace_provider_info_for_principal_in_protected_realm.py index 7433540cb..d8a678754 100644 --- a/foundry/v2/admin/errors/_cannot_replace_provider_info_for_principal_in_protected_realm.py +++ b/foundry/v2/admin/errors/_cannot_replace_provider_info_for_principal_in_protected_realm.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._principal_id import PrincipalId from foundry.v2.core.models._realm import Realm @@ -37,7 +36,7 @@ class CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters(TypedDict) @dataclass -class CannotReplaceProviderInfoForPrincipalInProtectedRealm(PalantirRPCException): +class CannotReplaceProviderInfoForPrincipalInProtectedRealm(BadRequestError): name: Literal["CannotReplaceProviderInfoForPrincipalInProtectedRealm"] parameters: CannotReplaceProviderInfoForPrincipalInProtectedRealmParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_create_group_permission_denied.py b/foundry/v2/admin/errors/_create_group_permission_denied.py index a6b67b35f..7bf6e1b51 100644 --- a/foundry/v2/admin/errors/_create_group_permission_denied.py +++ b/foundry/v2/admin/errors/_create_group_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateGroupPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateGroupPermissionDeniedParameters(TypedDict): @dataclass -class CreateGroupPermissionDenied(PalantirRPCException): +class CreateGroupPermissionDenied(PermissionDeniedError): name: Literal["CreateGroupPermissionDenied"] parameters: CreateGroupPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_create_marking_missing_initial_admin_role.py b/foundry/v2/admin/errors/_create_marking_missing_initial_admin_role.py index df6800a90..ec87dd3ff 100644 --- a/foundry/v2/admin/errors/_create_marking_missing_initial_admin_role.py +++ b/foundry/v2/admin/errors/_create_marking_missing_initial_admin_role.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class CreateMarkingMissingInitialAdminRoleParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateMarkingMissingInitialAdminRoleParameters(TypedDict): @dataclass -class CreateMarkingMissingInitialAdminRole(PalantirRPCException): +class CreateMarkingMissingInitialAdminRole(BadRequestError): name: Literal["CreateMarkingMissingInitialAdminRole"] parameters: CreateMarkingMissingInitialAdminRoleParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_create_marking_name_in_category_already_exists.py b/foundry/v2/admin/errors/_create_marking_name_in_category_already_exists.py index c99ff41ef..9e6420766 100644 --- a/foundry/v2/admin/errors/_create_marking_name_in_category_already_exists.py +++ b/foundry/v2/admin/errors/_create_marking_name_in_category_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.admin.models._marking_category_id import MarkingCategoryId @@ -36,7 +35,7 @@ class CreateMarkingNameInCategoryAlreadyExistsParameters(TypedDict): @dataclass -class CreateMarkingNameInCategoryAlreadyExists(PalantirRPCException): +class CreateMarkingNameInCategoryAlreadyExists(BadRequestError): name: Literal["CreateMarkingNameInCategoryAlreadyExists"] parameters: CreateMarkingNameInCategoryAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_create_marking_permission_denied.py b/foundry/v2/admin/errors/_create_marking_permission_denied.py index ffc0bd653..a28032d96 100644 --- a/foundry/v2/admin/errors/_create_marking_permission_denied.py +++ b/foundry/v2/admin/errors/_create_marking_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateMarkingPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateMarkingPermissionDeniedParameters(TypedDict): @dataclass -class CreateMarkingPermissionDenied(PalantirRPCException): +class CreateMarkingPermissionDenied(PermissionDeniedError): name: Literal["CreateMarkingPermissionDenied"] parameters: CreateMarkingPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_delete_group_permission_denied.py b/foundry/v2/admin/errors/_delete_group_permission_denied.py index 8bc0ccf09..ab57d1fed 100644 --- a/foundry/v2/admin/errors/_delete_group_permission_denied.py +++ b/foundry/v2/admin/errors/_delete_group_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class DeleteGroupPermissionDeniedParameters(TypedDict): @dataclass -class DeleteGroupPermissionDenied(PalantirRPCException): +class DeleteGroupPermissionDenied(PermissionDeniedError): name: Literal["DeleteGroupPermissionDenied"] parameters: DeleteGroupPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_delete_user_permission_denied.py b/foundry/v2/admin/errors/_delete_user_permission_denied.py index da9d45554..c6c09bb82 100644 --- a/foundry/v2/admin/errors/_delete_user_permission_denied.py +++ b/foundry/v2/admin/errors/_delete_user_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class DeleteUserPermissionDeniedParameters(TypedDict): @dataclass -class DeleteUserPermissionDenied(PalantirRPCException): +class DeleteUserPermissionDenied(PermissionDeniedError): name: Literal["DeleteUserPermissionDenied"] parameters: DeleteUserPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_enrollment_not_found.py b/foundry/v2/admin/errors/_enrollment_not_found.py index 03549dbcd..abcea4f28 100644 --- a/foundry/v2/admin/errors/_enrollment_not_found.py +++ b/foundry/v2/admin/errors/_enrollment_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._enrollment_rid import EnrollmentRid @@ -34,7 +33,7 @@ class EnrollmentNotFoundParameters(TypedDict): @dataclass -class EnrollmentNotFound(PalantirRPCException): +class EnrollmentNotFound(NotFoundError): name: Literal["EnrollmentNotFound"] parameters: EnrollmentNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_current_enrollment_permission_denied.py b/foundry/v2/admin/errors/_get_current_enrollment_permission_denied.py index 5afd2bacf..dc03213af 100644 --- a/foundry/v2/admin/errors/_get_current_enrollment_permission_denied.py +++ b/foundry/v2/admin/errors/_get_current_enrollment_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class GetCurrentEnrollmentPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class GetCurrentEnrollmentPermissionDeniedParameters(TypedDict): @dataclass -class GetCurrentEnrollmentPermissionDenied(PalantirRPCException): +class GetCurrentEnrollmentPermissionDenied(PermissionDeniedError): name: Literal["GetCurrentEnrollmentPermissionDenied"] parameters: GetCurrentEnrollmentPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_current_user_permission_denied.py b/foundry/v2/admin/errors/_get_current_user_permission_denied.py index 6825be2f7..da40245b1 100644 --- a/foundry/v2/admin/errors/_get_current_user_permission_denied.py +++ b/foundry/v2/admin/errors/_get_current_user_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class GetCurrentUserPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class GetCurrentUserPermissionDeniedParameters(TypedDict): @dataclass -class GetCurrentUserPermissionDenied(PalantirRPCException): +class GetCurrentUserPermissionDenied(PermissionDeniedError): name: Literal["GetCurrentUserPermissionDenied"] parameters: GetCurrentUserPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_group_provider_info_permission_denied.py b/foundry/v2/admin/errors/_get_group_provider_info_permission_denied.py index d36847446..88f9885f4 100644 --- a/foundry/v2/admin/errors/_get_group_provider_info_permission_denied.py +++ b/foundry/v2/admin/errors/_get_group_provider_info_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GetGroupProviderInfoPermissionDeniedParameters(TypedDict): @dataclass -class GetGroupProviderInfoPermissionDenied(PalantirRPCException): +class GetGroupProviderInfoPermissionDenied(PermissionDeniedError): name: Literal["GetGroupProviderInfoPermissionDenied"] parameters: GetGroupProviderInfoPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_marking_category_permission_denied.py b/foundry/v2/admin/errors/_get_marking_category_permission_denied.py index f848da885..f9c8a3eb4 100644 --- a/foundry/v2/admin/errors/_get_marking_category_permission_denied.py +++ b/foundry/v2/admin/errors/_get_marking_category_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.admin.models._marking_category_id import MarkingCategoryId @@ -34,7 +33,7 @@ class GetMarkingCategoryPermissionDeniedParameters(TypedDict): @dataclass -class GetMarkingCategoryPermissionDenied(PalantirRPCException): +class GetMarkingCategoryPermissionDenied(PermissionDeniedError): name: Literal["GetMarkingCategoryPermissionDenied"] parameters: GetMarkingCategoryPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_marking_permission_denied.py b/foundry/v2/admin/errors/_get_marking_permission_denied.py index 7a2018c36..b4670cfb6 100644 --- a/foundry/v2/admin/errors/_get_marking_permission_denied.py +++ b/foundry/v2/admin/errors/_get_marking_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class GetMarkingPermissionDeniedParameters(TypedDict): @dataclass -class GetMarkingPermissionDenied(PalantirRPCException): +class GetMarkingPermissionDenied(PermissionDeniedError): name: Literal["GetMarkingPermissionDenied"] parameters: GetMarkingPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_markings_user_permission_denied.py b/foundry/v2/admin/errors/_get_markings_user_permission_denied.py index abb6bee46..8d3b744c3 100644 --- a/foundry/v2/admin/errors/_get_markings_user_permission_denied.py +++ b/foundry/v2/admin/errors/_get_markings_user_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GetMarkingsUserPermissionDeniedParameters(TypedDict): @dataclass -class GetMarkingsUserPermissionDenied(PalantirRPCException): +class GetMarkingsUserPermissionDenied(PermissionDeniedError): name: Literal["GetMarkingsUserPermissionDenied"] parameters: GetMarkingsUserPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_profile_picture_of_user_permission_denied.py b/foundry/v2/admin/errors/_get_profile_picture_of_user_permission_denied.py index 336d1f5d0..c3870e976 100644 --- a/foundry/v2/admin/errors/_get_profile_picture_of_user_permission_denied.py +++ b/foundry/v2/admin/errors/_get_profile_picture_of_user_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GetProfilePictureOfUserPermissionDeniedParameters(TypedDict): @dataclass -class GetProfilePictureOfUserPermissionDenied(PalantirRPCException): +class GetProfilePictureOfUserPermissionDenied(PermissionDeniedError): name: Literal["GetProfilePictureOfUserPermissionDenied"] parameters: GetProfilePictureOfUserPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_get_user_provider_info_permission_denied.py b/foundry/v2/admin/errors/_get_user_provider_info_permission_denied.py index d2321c6c3..8afbcc38f 100644 --- a/foundry/v2/admin/errors/_get_user_provider_info_permission_denied.py +++ b/foundry/v2/admin/errors/_get_user_provider_info_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GetUserProviderInfoPermissionDeniedParameters(TypedDict): @dataclass -class GetUserProviderInfoPermissionDenied(PalantirRPCException): +class GetUserProviderInfoPermissionDenied(PermissionDeniedError): name: Literal["GetUserProviderInfoPermissionDenied"] parameters: GetUserProviderInfoPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_group_name_already_exists.py b/foundry/v2/admin/errors/_group_name_already_exists.py index fdfced634..957078c86 100644 --- a/foundry/v2/admin/errors/_group_name_already_exists.py +++ b/foundry/v2/admin/errors/_group_name_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class GroupNameAlreadyExistsParameters(TypedDict): @@ -33,7 +32,7 @@ class GroupNameAlreadyExistsParameters(TypedDict): @dataclass -class GroupNameAlreadyExists(PalantirRPCException): +class GroupNameAlreadyExists(BadRequestError): name: Literal["GroupNameAlreadyExists"] parameters: GroupNameAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_group_not_found.py b/foundry/v2/admin/errors/_group_not_found.py index d12eac9c8..8ad7a6971 100644 --- a/foundry/v2/admin/errors/_group_not_found.py +++ b/foundry/v2/admin/errors/_group_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GroupNotFoundParameters(TypedDict): @dataclass -class GroupNotFound(PalantirRPCException): +class GroupNotFound(NotFoundError): name: Literal["GroupNotFound"] parameters: GroupNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_group_provider_info_not_found.py b/foundry/v2/admin/errors/_group_provider_info_not_found.py index fb3753776..bd8af9f6c 100644 --- a/foundry/v2/admin/errors/_group_provider_info_not_found.py +++ b/foundry/v2/admin/errors/_group_provider_info_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class GroupProviderInfoNotFoundParameters(TypedDict): @dataclass -class GroupProviderInfoNotFound(PalantirRPCException): +class GroupProviderInfoNotFound(NotFoundError): name: Literal["GroupProviderInfoNotFound"] parameters: GroupProviderInfoNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_invalid_group_membership_expiration.py b/foundry/v2/admin/errors/_invalid_group_membership_expiration.py index b5bc5c1b6..9fac0eb0c 100644 --- a/foundry/v2/admin/errors/_invalid_group_membership_expiration.py +++ b/foundry/v2/admin/errors/_invalid_group_membership_expiration.py @@ -19,11 +19,10 @@ from datetime import datetime from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.admin.models._group_membership_expiration import GroupMembershipExpiration # NOQA from foundry.v2.core.models._principal_id import PrincipalId @@ -43,7 +42,7 @@ class InvalidGroupMembershipExpirationParameters(TypedDict): @dataclass -class InvalidGroupMembershipExpiration(PalantirRPCException): +class InvalidGroupMembershipExpiration(BadRequestError): name: Literal["InvalidGroupMembershipExpiration"] parameters: InvalidGroupMembershipExpirationParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_invalid_group_organizations.py b/foundry/v2/admin/errors/_invalid_group_organizations.py index ad4d2cc7a..a76662c6d 100644 --- a/foundry/v2/admin/errors/_invalid_group_organizations.py +++ b/foundry/v2/admin/errors/_invalid_group_organizations.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidGroupOrganizationsParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidGroupOrganizationsParameters(TypedDict): @dataclass -class InvalidGroupOrganizations(PalantirRPCException): +class InvalidGroupOrganizations(BadRequestError): name: Literal["InvalidGroupOrganizations"] parameters: InvalidGroupOrganizationsParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_invalid_host_name.py b/foundry/v2/admin/errors/_invalid_host_name.py index 9e725a09f..d03567652 100644 --- a/foundry/v2/admin/errors/_invalid_host_name.py +++ b/foundry/v2/admin/errors/_invalid_host_name.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidHostNameParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidHostNameParameters(TypedDict): @dataclass -class InvalidHostName(PalantirRPCException): +class InvalidHostName(BadRequestError): name: Literal["InvalidHostName"] parameters: InvalidHostNameParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_invalid_profile_picture.py b/foundry/v2/admin/errors/_invalid_profile_picture.py index 581884bab..bf0640de6 100644 --- a/foundry/v2/admin/errors/_invalid_profile_picture.py +++ b/foundry/v2/admin/errors/_invalid_profile_picture.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class InvalidProfilePictureParameters(TypedDict): @dataclass -class InvalidProfilePicture(PalantirRPCException): +class InvalidProfilePicture(BadRequestError): name: Literal["InvalidProfilePicture"] parameters: InvalidProfilePictureParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_list_hosts_permission_denied.py b/foundry/v2/admin/errors/_list_hosts_permission_denied.py index 3a9c9d831..482b58e1a 100644 --- a/foundry/v2/admin/errors/_list_hosts_permission_denied.py +++ b/foundry/v2/admin/errors/_list_hosts_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._enrollment_rid import EnrollmentRid @@ -34,7 +33,7 @@ class ListHostsPermissionDeniedParameters(TypedDict): @dataclass -class ListHostsPermissionDenied(PalantirRPCException): +class ListHostsPermissionDenied(PermissionDeniedError): name: Literal["ListHostsPermissionDenied"] parameters: ListHostsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_list_marking_members_permission_denied.py b/foundry/v2/admin/errors/_list_marking_members_permission_denied.py index 2becc40ec..3bb5de682 100644 --- a/foundry/v2/admin/errors/_list_marking_members_permission_denied.py +++ b/foundry/v2/admin/errors/_list_marking_members_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class ListMarkingMembersPermissionDeniedParameters(TypedDict): @dataclass -class ListMarkingMembersPermissionDenied(PalantirRPCException): +class ListMarkingMembersPermissionDenied(PermissionDeniedError): name: Literal["ListMarkingMembersPermissionDenied"] parameters: ListMarkingMembersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_list_marking_role_assignments_permission_denied.py b/foundry/v2/admin/errors/_list_marking_role_assignments_permission_denied.py index c610060fa..8361a03df 100644 --- a/foundry/v2/admin/errors/_list_marking_role_assignments_permission_denied.py +++ b/foundry/v2/admin/errors/_list_marking_role_assignments_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class ListMarkingRoleAssignmentsPermissionDeniedParameters(TypedDict): @dataclass -class ListMarkingRoleAssignmentsPermissionDenied(PalantirRPCException): +class ListMarkingRoleAssignmentsPermissionDenied(PermissionDeniedError): name: Literal["ListMarkingRoleAssignmentsPermissionDenied"] parameters: ListMarkingRoleAssignmentsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_marking_category_not_found.py b/foundry/v2/admin/errors/_marking_category_not_found.py index 56eb55e30..fae70d62f 100644 --- a/foundry/v2/admin/errors/_marking_category_not_found.py +++ b/foundry/v2/admin/errors/_marking_category_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.admin.models._marking_category_id import MarkingCategoryId @@ -34,7 +33,7 @@ class MarkingCategoryNotFoundParameters(TypedDict): @dataclass -class MarkingCategoryNotFound(PalantirRPCException): +class MarkingCategoryNotFound(NotFoundError): name: Literal["MarkingCategoryNotFound"] parameters: MarkingCategoryNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_marking_not_found.py b/foundry/v2/admin/errors/_marking_not_found.py index 9b644e945..aa0c4c135 100644 --- a/foundry/v2/admin/errors/_marking_not_found.py +++ b/foundry/v2/admin/errors/_marking_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class MarkingNotFoundParameters(TypedDict): @dataclass -class MarkingNotFound(PalantirRPCException): +class MarkingNotFound(NotFoundError): name: Literal["MarkingNotFound"] parameters: MarkingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_organization_not_found.py b/foundry/v2/admin/errors/_organization_not_found.py index 4eef21f73..56d6b8692 100644 --- a/foundry/v2/admin/errors/_organization_not_found.py +++ b/foundry/v2/admin/errors/_organization_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -34,7 +33,7 @@ class OrganizationNotFoundParameters(TypedDict): @dataclass -class OrganizationNotFound(PalantirRPCException): +class OrganizationNotFound(NotFoundError): name: Literal["OrganizationNotFound"] parameters: OrganizationNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_principal_not_found.py b/foundry/v2/admin/errors/_principal_not_found.py index f7ec459d0..5c2541395 100644 --- a/foundry/v2/admin/errors/_principal_not_found.py +++ b/foundry/v2/admin/errors/_principal_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class PrincipalNotFoundParameters(TypedDict): @dataclass -class PrincipalNotFound(PalantirRPCException): +class PrincipalNotFound(NotFoundError): name: Literal["PrincipalNotFound"] parameters: PrincipalNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_profile_picture_not_found.py b/foundry/v2/admin/errors/_profile_picture_not_found.py index 8092d8ab5..0ac8728f8 100644 --- a/foundry/v2/admin/errors/_profile_picture_not_found.py +++ b/foundry/v2/admin/errors/_profile_picture_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class ProfilePictureNotFoundParameters(TypedDict): @dataclass -class ProfilePictureNotFound(PalantirRPCException): +class ProfilePictureNotFound(NotFoundError): name: Literal["ProfilePictureNotFound"] parameters: ProfilePictureNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_remove_group_members_permission_denied.py b/foundry/v2/admin/errors/_remove_group_members_permission_denied.py index 5f7823eb7..3f6006530 100644 --- a/foundry/v2/admin/errors/_remove_group_members_permission_denied.py +++ b/foundry/v2/admin/errors/_remove_group_members_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class RemoveGroupMembersPermissionDeniedParameters(TypedDict): @dataclass -class RemoveGroupMembersPermissionDenied(PalantirRPCException): +class RemoveGroupMembersPermissionDenied(PermissionDeniedError): name: Literal["RemoveGroupMembersPermissionDenied"] parameters: RemoveGroupMembersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_remove_marking_members_permission_denied.py b/foundry/v2/admin/errors/_remove_marking_members_permission_denied.py index 050eef565..7a169d8cf 100644 --- a/foundry/v2/admin/errors/_remove_marking_members_permission_denied.py +++ b/foundry/v2/admin/errors/_remove_marking_members_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class RemoveMarkingMembersPermissionDeniedParameters(TypedDict): @dataclass -class RemoveMarkingMembersPermissionDenied(PalantirRPCException): +class RemoveMarkingMembersPermissionDenied(PermissionDeniedError): name: Literal["RemoveMarkingMembersPermissionDenied"] parameters: RemoveMarkingMembersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_remove_marking_role_assignments_permission_denied.py b/foundry/v2/admin/errors/_remove_marking_role_assignments_permission_denied.py index abcc34d59..e9e18f132 100644 --- a/foundry/v2/admin/errors/_remove_marking_role_assignments_permission_denied.py +++ b/foundry/v2/admin/errors/_remove_marking_role_assignments_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._marking_id import MarkingId @@ -34,7 +33,7 @@ class RemoveMarkingRoleAssignmentsPermissionDeniedParameters(TypedDict): @dataclass -class RemoveMarkingRoleAssignmentsPermissionDenied(PalantirRPCException): +class RemoveMarkingRoleAssignmentsPermissionDenied(PermissionDeniedError): name: Literal["RemoveMarkingRoleAssignmentsPermissionDenied"] parameters: RemoveMarkingRoleAssignmentsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_remove_marking_role_assignments_remove_all_administrators_not_allowed.py b/foundry/v2/admin/errors/_remove_marking_role_assignments_remove_all_administrators_not_allowed.py index 48b34f659..805ac8a50 100644 --- a/foundry/v2/admin/errors/_remove_marking_role_assignments_remove_all_administrators_not_allowed.py +++ b/foundry/v2/admin/errors/_remove_marking_role_assignments_remove_all_administrators_not_allowed.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._marking_id import MarkingId from foundry.v2.core.models._principal_id import PrincipalId @@ -38,7 +37,7 @@ class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters(Ty @dataclass -class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed(PalantirRPCException): +class RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed(BadRequestError): name: Literal["RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed"] parameters: RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_replace_group_provider_info_permission_denied.py b/foundry/v2/admin/errors/_replace_group_provider_info_permission_denied.py index 008b8613f..634e857ec 100644 --- a/foundry/v2/admin/errors/_replace_group_provider_info_permission_denied.py +++ b/foundry/v2/admin/errors/_replace_group_provider_info_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class ReplaceGroupProviderInfoPermissionDeniedParameters(TypedDict): @dataclass -class ReplaceGroupProviderInfoPermissionDenied(PalantirRPCException): +class ReplaceGroupProviderInfoPermissionDenied(PermissionDeniedError): name: Literal["ReplaceGroupProviderInfoPermissionDenied"] parameters: ReplaceGroupProviderInfoPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_replace_organization_permission_denied.py b/foundry/v2/admin/errors/_replace_organization_permission_denied.py index 07e7a5a80..efec09d82 100644 --- a/foundry/v2/admin/errors/_replace_organization_permission_denied.py +++ b/foundry/v2/admin/errors/_replace_organization_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -34,7 +33,7 @@ class ReplaceOrganizationPermissionDeniedParameters(TypedDict): @dataclass -class ReplaceOrganizationPermissionDenied(PalantirRPCException): +class ReplaceOrganizationPermissionDenied(PermissionDeniedError): name: Literal["ReplaceOrganizationPermissionDenied"] parameters: ReplaceOrganizationPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_replace_user_provider_info_permission_denied.py b/foundry/v2/admin/errors/_replace_user_provider_info_permission_denied.py index af0b6dba1..9d15718a1 100644 --- a/foundry/v2/admin/errors/_replace_user_provider_info_permission_denied.py +++ b/foundry/v2/admin/errors/_replace_user_provider_info_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class ReplaceUserProviderInfoPermissionDeniedParameters(TypedDict): @dataclass -class ReplaceUserProviderInfoPermissionDenied(PalantirRPCException): +class ReplaceUserProviderInfoPermissionDenied(PermissionDeniedError): name: Literal["ReplaceUserProviderInfoPermissionDenied"] parameters: ReplaceUserProviderInfoPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_search_groups_permission_denied.py b/foundry/v2/admin/errors/_search_groups_permission_denied.py index 696b752c6..01f696bf1 100644 --- a/foundry/v2/admin/errors/_search_groups_permission_denied.py +++ b/foundry/v2/admin/errors/_search_groups_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class SearchGroupsPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class SearchGroupsPermissionDeniedParameters(TypedDict): @dataclass -class SearchGroupsPermissionDenied(PalantirRPCException): +class SearchGroupsPermissionDenied(PermissionDeniedError): name: Literal["SearchGroupsPermissionDenied"] parameters: SearchGroupsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_search_users_permission_denied.py b/foundry/v2/admin/errors/_search_users_permission_denied.py index 6697cecac..b5faba25a 100644 --- a/foundry/v2/admin/errors/_search_users_permission_denied.py +++ b/foundry/v2/admin/errors/_search_users_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class SearchUsersPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class SearchUsersPermissionDeniedParameters(TypedDict): @dataclass -class SearchUsersPermissionDenied(PalantirRPCException): +class SearchUsersPermissionDenied(PermissionDeniedError): name: Literal["SearchUsersPermissionDenied"] parameters: SearchUsersPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_user_not_found.py b/foundry/v2/admin/errors/_user_not_found.py index d61577712..fa33a9607 100644 --- a/foundry/v2/admin/errors/_user_not_found.py +++ b/foundry/v2/admin/errors/_user_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class UserNotFoundParameters(TypedDict): @dataclass -class UserNotFound(PalantirRPCException): +class UserNotFound(NotFoundError): name: Literal["UserNotFound"] parameters: UserNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/errors/_user_provider_info_not_found.py b/foundry/v2/admin/errors/_user_provider_info_not_found.py index 73017322a..74952cbd7 100644 --- a/foundry/v2/admin/errors/_user_provider_info_not_found.py +++ b/foundry/v2/admin/errors/_user_provider_info_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._principal_id import PrincipalId @@ -34,7 +33,7 @@ class UserProviderInfoNotFoundParameters(TypedDict): @dataclass -class UserProviderInfoNotFound(PalantirRPCException): +class UserProviderInfoNotFound(NotFoundError): name: Literal["UserProviderInfoNotFound"] parameters: UserProviderInfoNotFoundParameters error_instance_id: str diff --git a/foundry/v2/admin/group.py b/foundry/v2/admin/group.py index e3b047eba..e102c45c8 100644 --- a/foundry/v2/admin/group.py +++ b/foundry/v2/admin/group.py @@ -36,6 +36,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.group_member import GroupMemberClient from foundry.v2.admin.group_provider_info import GroupProviderInfoClient from foundry.v2.admin.models._attribute_name import AttributeName @@ -108,6 +109,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Group + + :raises CreateGroupPermissionDenied: Could not create the Group. + :raises GroupNameAlreadyExists: A group with this name already exists + :raises InvalidGroupOrganizations: You must provide at least one Organization RID for a group """ return self._api_client.call_api( @@ -137,6 +142,11 @@ def create( ), response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, + "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, + "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, + }, ), ).decode() @@ -157,6 +167,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteGroupPermissionDenied: Could not delete the Group. """ return self._api_client.call_api( @@ -172,6 +184,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, + }, ), ).decode() @@ -192,6 +207,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Group + + :raises GroupNotFound: The given Group could not be found. """ return self._api_client.call_api( @@ -209,6 +226,9 @@ def get( body_type=None, response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + }, ), ).decode() @@ -252,6 +272,7 @@ def get_batch( ], response_type=GetGroupsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -295,6 +316,7 @@ def list( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -344,6 +366,7 @@ def page( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -370,6 +393,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: SearchGroupsResponse + + :raises SearchGroupsPermissionDenied: Could not search the Group. """ return self._api_client.call_api( @@ -397,6 +422,9 @@ def search( ), response_type=SearchGroupsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, + }, ), ).decode() @@ -444,6 +472,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Group] + + :raises CreateGroupPermissionDenied: Could not create the Group. + :raises GroupNameAlreadyExists: A group with this name already exists + :raises InvalidGroupOrganizations: You must provide at least one Organization RID for a group """ return self._api_client.call_api( @@ -473,6 +505,11 @@ def create( ), response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, + "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, + "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, + }, ), ) @@ -493,6 +530,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteGroupPermissionDenied: Could not delete the Group. """ return self._api_client.call_api( @@ -508,6 +547,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, + }, ), ) @@ -528,6 +570,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Group] + + :raises GroupNotFound: The given Group could not be found. """ return self._api_client.call_api( @@ -545,6 +589,9 @@ def get( body_type=None, response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + }, ), ) @@ -588,6 +635,7 @@ def get_batch( ], response_type=GetGroupsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -631,6 +679,7 @@ def list( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -680,6 +729,7 @@ def page( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -706,6 +756,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[SearchGroupsResponse] + + :raises SearchGroupsPermissionDenied: Could not search the Group. """ return self._api_client.call_api( @@ -733,6 +785,9 @@ def search( ), response_type=SearchGroupsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, + }, ), ) @@ -780,6 +835,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Group] + + :raises CreateGroupPermissionDenied: Could not create the Group. + :raises GroupNameAlreadyExists: A group with this name already exists + :raises InvalidGroupOrganizations: You must provide at least one Organization RID for a group """ return self._api_client.stream_api( @@ -809,6 +868,11 @@ def create( ), response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "CreateGroupPermissionDenied": admin_errors.CreateGroupPermissionDenied, + "GroupNameAlreadyExists": admin_errors.GroupNameAlreadyExists, + "InvalidGroupOrganizations": admin_errors.InvalidGroupOrganizations, + }, ), ) @@ -829,6 +893,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteGroupPermissionDenied: Could not delete the Group. """ return self._api_client.stream_api( @@ -844,6 +910,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteGroupPermissionDenied": admin_errors.DeleteGroupPermissionDenied, + }, ), ) @@ -864,6 +933,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Group] + + :raises GroupNotFound: The given Group could not be found. """ return self._api_client.stream_api( @@ -881,6 +952,9 @@ def get( body_type=None, response_type=Group, request_timeout=request_timeout, + throwable_errors={ + "GroupNotFound": admin_errors.GroupNotFound, + }, ), ) @@ -924,6 +998,7 @@ def get_batch( ], response_type=GetGroupsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -967,6 +1042,7 @@ def list( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1016,6 +1092,7 @@ def page( body_type=None, response_type=ListGroupsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1042,6 +1119,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[SearchGroupsResponse] + + :raises SearchGroupsPermissionDenied: Could not search the Group. """ return self._api_client.stream_api( @@ -1069,5 +1148,8 @@ def search( ), response_type=SearchGroupsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchGroupsPermissionDenied": admin_errors.SearchGroupsPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/group_member.py b/foundry/v2/admin/group_member.py index 8f52992b3..7f6111c01 100644 --- a/foundry/v2/admin/group_member.py +++ b/foundry/v2/admin/group_member.py @@ -34,6 +34,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._group_member import GroupMember from foundry.v2.admin.models._group_membership_expiration import GroupMembershipExpiration # NOQA from foundry.v2.admin.models._list_group_members_response import ListGroupMembersResponse # NOQA @@ -86,6 +87,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -112,6 +116,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ).decode() @@ -169,6 +177,7 @@ def list( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -232,6 +241,7 @@ def page( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -255,6 +265,9 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. """ return self._api_client.call_api( @@ -279,6 +292,10 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, + }, ), ).decode() @@ -323,6 +340,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -349,6 +369,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -406,6 +430,7 @@ def list( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -469,6 +494,7 @@ def page( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -492,6 +518,9 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. """ return self._api_client.call_api( @@ -516,6 +545,10 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, + }, ), ) @@ -560,6 +593,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddGroupMembersPermissionDenied: Could not add the GroupMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.stream_api( @@ -586,6 +622,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddGroupMembersPermissionDenied": admin_errors.AddGroupMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -643,6 +683,7 @@ def list( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -706,6 +747,7 @@ def page( body_type=None, response_type=ListGroupMembersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -729,6 +771,9 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveGroupMembersPermissionDenied: Could not remove the GroupMember. """ return self._api_client.stream_api( @@ -753,5 +798,9 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveGroupMembersPermissionDenied": admin_errors.RemoveGroupMembersPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/group_membership.py b/foundry/v2/admin/group_membership.py index 34e9a90c7..58ef8365e 100644 --- a/foundry/v2/admin/group_membership.py +++ b/foundry/v2/admin/group_membership.py @@ -118,6 +118,7 @@ def list( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -181,6 +182,7 @@ def page( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -256,6 +258,7 @@ def list( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -319,6 +322,7 @@ def page( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -394,6 +398,7 @@ def list( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -457,5 +462,6 @@ def page( body_type=None, response_type=ListGroupMembershipsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/admin/group_provider_info.py b/foundry/v2/admin/group_provider_info.py index cdef7e1db..7eb47aedd 100644 --- a/foundry/v2/admin/group_provider_info.py +++ b/foundry/v2/admin/group_provider_info.py @@ -31,6 +31,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._group_provider_info import GroupProviderInfo from foundry.v2.admin.models._provider_id import ProviderId from foundry.v2.core.models._preview_mode import PreviewMode @@ -80,6 +81,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: GroupProviderInfo + + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. """ return self._api_client.call_api( @@ -99,6 +102,9 @@ def get( body_type=None, response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + }, ), ).decode() @@ -125,6 +131,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: GroupProviderInfo + + :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. """ return self._api_client.call_api( @@ -152,6 +160,9 @@ def replace( ), response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, + }, ), ).decode() @@ -193,6 +204,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[GroupProviderInfo] + + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. """ return self._api_client.call_api( @@ -212,6 +225,9 @@ def get( body_type=None, response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + }, ), ) @@ -238,6 +254,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[GroupProviderInfo] + + :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. """ return self._api_client.call_api( @@ -265,6 +283,9 @@ def replace( ), response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, + }, ), ) @@ -306,6 +327,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[GroupProviderInfo] + + :raises GroupProviderInfoNotFound: The given GroupProviderInfo could not be found. """ return self._api_client.stream_api( @@ -325,6 +348,9 @@ def get( body_type=None, response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "GroupProviderInfoNotFound": admin_errors.GroupProviderInfoNotFound, + }, ), ) @@ -351,6 +377,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[GroupProviderInfo] + + :raises ReplaceGroupProviderInfoPermissionDenied: Could not replace the GroupProviderInfo. """ return self._api_client.stream_api( @@ -378,5 +406,8 @@ def replace( ), response_type=GroupProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceGroupProviderInfoPermissionDenied": admin_errors.ReplaceGroupProviderInfoPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/host.py b/foundry/v2/admin/host.py index 7ab8a284a..196d2b6d3 100644 --- a/foundry/v2/admin/host.py +++ b/foundry/v2/admin/host.py @@ -32,6 +32,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._host import Host from foundry.v2.admin.models._list_hosts_response import ListHostsResponse from foundry.v2.core.models._enrollment_rid import EnrollmentRid @@ -89,6 +90,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ResourceIterator[Host] + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ return self._api_client.iterate_api( @@ -110,6 +113,9 @@ def list( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ) @@ -141,6 +147,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ListHostsResponse + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ warnings.warn( @@ -168,6 +176,9 @@ def page( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ).decode() @@ -217,6 +228,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListHostsResponse] + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ return self._api_client.call_api( @@ -238,6 +251,9 @@ def list( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ) @@ -269,6 +285,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListHostsResponse] + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ warnings.warn( @@ -296,6 +314,9 @@ def page( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ) @@ -345,6 +366,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListHostsResponse] + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ return self._api_client.stream_api( @@ -366,6 +389,9 @@ def list( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ) @@ -397,6 +423,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListHostsResponse] + + :raises ListHostsPermissionDenied: You do not have permission to list hosts for this enrollment """ warnings.warn( @@ -424,5 +452,8 @@ def page( body_type=None, response_type=ListHostsResponse, request_timeout=request_timeout, + throwable_errors={ + "ListHostsPermissionDenied": admin_errors.ListHostsPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/marking.py b/foundry/v2/admin/marking.py index 4834eaed2..ff7aeac45 100644 --- a/foundry/v2/admin/marking.py +++ b/foundry/v2/admin/marking.py @@ -36,6 +36,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.marking_member import MarkingMemberClient from foundry.v2.admin.marking_role_assignment import MarkingRoleAssignmentClient from foundry.v2.admin.models._get_markings_batch_request_element import ( @@ -115,6 +116,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Marking + + :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. + :raises CreateMarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises CreateMarkingPermissionDenied: Could not create the Marking. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -150,6 +156,12 @@ def create( ), response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, + "CreateMarkingNameInCategoryAlreadyExists": admin_errors.CreateMarkingNameInCategoryAlreadyExists, + "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ).decode() @@ -173,6 +185,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Marking + + :raises GetMarkingPermissionDenied: You do not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. """ return self._api_client.call_api( @@ -192,6 +207,10 @@ def get( body_type=None, response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, ), ).decode() @@ -240,6 +259,7 @@ def get_batch( ], response_type=GetMarkingsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -285,6 +305,7 @@ def list( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -336,6 +357,7 @@ def page( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -389,6 +411,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Marking] + + :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. + :raises CreateMarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises CreateMarkingPermissionDenied: Could not create the Marking. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -424,6 +451,12 @@ def create( ), response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, + "CreateMarkingNameInCategoryAlreadyExists": admin_errors.CreateMarkingNameInCategoryAlreadyExists, + "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -447,6 +480,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Marking] + + :raises GetMarkingPermissionDenied: You do not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. """ return self._api_client.call_api( @@ -466,6 +502,10 @@ def get( body_type=None, response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, ), ) @@ -514,6 +554,7 @@ def get_batch( ], response_type=GetMarkingsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -559,6 +600,7 @@ def list( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -610,6 +652,7 @@ def page( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -663,6 +706,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Marking] + + :raises CreateMarkingMissingInitialAdminRole: At least one ADMIN role assignment must be provided when creating a marking. + :raises CreateMarkingNameInCategoryAlreadyExists: A marking with the same name already exists in the category. + :raises CreateMarkingPermissionDenied: Could not create the Marking. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.stream_api( @@ -698,6 +746,12 @@ def create( ), response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "CreateMarkingMissingInitialAdminRole": admin_errors.CreateMarkingMissingInitialAdminRole, + "CreateMarkingNameInCategoryAlreadyExists": admin_errors.CreateMarkingNameInCategoryAlreadyExists, + "CreateMarkingPermissionDenied": admin_errors.CreateMarkingPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -721,6 +775,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Marking] + + :raises GetMarkingPermissionDenied: You do not have permission to view the marking. + :raises MarkingNotFound: The given Marking could not be found. """ return self._api_client.stream_api( @@ -740,6 +797,10 @@ def get( body_type=None, response_type=Marking, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingPermissionDenied": admin_errors.GetMarkingPermissionDenied, + "MarkingNotFound": admin_errors.MarkingNotFound, + }, ), ) @@ -788,6 +849,7 @@ def get_batch( ], response_type=GetMarkingsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -833,6 +895,7 @@ def list( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -884,5 +947,6 @@ def page( body_type=None, response_type=ListMarkingsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/admin/marking_category.py b/foundry/v2/admin/marking_category.py index fbdf0c9a6..e93cc2f0d 100644 --- a/foundry/v2/admin/marking_category.py +++ b/foundry/v2/admin/marking_category.py @@ -32,6 +32,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._list_marking_categories_response import ( ListMarkingCategoriesResponse, ) # NOQA @@ -85,6 +86,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: MarkingCategory + + :raises GetMarkingCategoryPermissionDenied: You do not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. """ return self._api_client.call_api( @@ -104,6 +108,10 @@ def get( body_type=None, response_type=MarkingCategory, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + }, ), ).decode() @@ -149,6 +157,7 @@ def list( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -200,6 +209,7 @@ def page( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -241,6 +251,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[MarkingCategory] + + :raises GetMarkingCategoryPermissionDenied: You do not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. """ return self._api_client.call_api( @@ -260,6 +273,10 @@ def get( body_type=None, response_type=MarkingCategory, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + }, ), ) @@ -305,6 +322,7 @@ def list( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -356,6 +374,7 @@ def page( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -397,6 +416,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[MarkingCategory] + + :raises GetMarkingCategoryPermissionDenied: You do not have permission to view the marking category. + :raises MarkingCategoryNotFound: The given MarkingCategory could not be found. """ return self._api_client.stream_api( @@ -416,6 +438,10 @@ def get( body_type=None, response_type=MarkingCategory, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingCategoryPermissionDenied": admin_errors.GetMarkingCategoryPermissionDenied, + "MarkingCategoryNotFound": admin_errors.MarkingCategoryNotFound, + }, ), ) @@ -461,6 +487,7 @@ def list( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -512,5 +539,6 @@ def page( body_type=None, response_type=ListMarkingCategoriesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/admin/marking_member.py b/foundry/v2/admin/marking_member.py index 07eab8537..54d8e296f 100644 --- a/foundry/v2/admin/marking_member.py +++ b/foundry/v2/admin/marking_member.py @@ -34,6 +34,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._list_marking_members_response import ( ListMarkingMembersResponse, ) # NOQA @@ -91,6 +92,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -117,6 +121,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ).decode() @@ -151,6 +159,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ResourceIterator[MarkingMember] + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ return self._api_client.iterate_api( @@ -173,6 +183,9 @@ def list( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ) @@ -207,6 +220,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ListMarkingMembersResponse + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ warnings.warn( @@ -235,6 +250,9 @@ def page( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ).decode() @@ -261,6 +279,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. """ return self._api_client.call_api( @@ -287,6 +307,9 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + }, ), ).decode() @@ -331,6 +354,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.call_api( @@ -357,6 +383,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -391,6 +421,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListMarkingMembersResponse] + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ return self._api_client.call_api( @@ -413,6 +445,9 @@ def list( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ) @@ -447,6 +482,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListMarkingMembersResponse] + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ warnings.warn( @@ -475,6 +512,9 @@ def page( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ) @@ -501,6 +541,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. """ return self._api_client.call_api( @@ -527,6 +569,9 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + }, ), ) @@ -571,6 +616,9 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddMarkingMembersPermissionDenied: Could not add the MarkingMember. + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found """ return self._api_client.stream_api( @@ -597,6 +645,10 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingMembersPermissionDenied": admin_errors.AddMarkingMembersPermissionDenied, + "PrincipalNotFound": admin_errors.PrincipalNotFound, + }, ), ) @@ -631,6 +683,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListMarkingMembersResponse] + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ return self._api_client.stream_api( @@ -653,6 +707,9 @@ def list( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ) @@ -687,6 +744,8 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListMarkingMembersResponse] + + :raises ListMarkingMembersPermissionDenied: You do not have permission to list the members of this marking. """ warnings.warn( @@ -715,6 +774,9 @@ def page( body_type=None, response_type=ListMarkingMembersResponse, request_timeout=request_timeout, + throwable_errors={ + "ListMarkingMembersPermissionDenied": admin_errors.ListMarkingMembersPermissionDenied, + }, ), ) @@ -741,6 +803,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises RemoveMarkingMembersPermissionDenied: Could not remove the MarkingMember. """ return self._api_client.stream_api( @@ -767,5 +831,8 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingMembersPermissionDenied": admin_errors.RemoveMarkingMembersPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/marking_role_assignment.py b/foundry/v2/admin/marking_role_assignment.py index 35685dea1..4742bfa32 100644 --- a/foundry/v2/admin/marking_role_assignment.py +++ b/foundry/v2/admin/marking_role_assignment.py @@ -35,6 +35,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._list_marking_role_assignments_response import ( ListMarkingRoleAssignmentsResponse, ) # NOQA @@ -93,6 +94,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. """ return self._api_client.call_api( @@ -119,6 +122,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, + }, ), ).decode() @@ -170,6 +176,7 @@ def list( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -227,6 +234,7 @@ def page( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -253,6 +261,10 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. + :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. """ return self._api_client.call_api( @@ -279,6 +291,11 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, + }, ), ).decode() @@ -323,6 +340,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. """ return self._api_client.call_api( @@ -349,6 +368,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, + }, ), ) @@ -400,6 +422,7 @@ def list( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -457,6 +480,7 @@ def page( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -483,6 +507,10 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. + :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. """ return self._api_client.call_api( @@ -509,6 +537,11 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, + }, ), ) @@ -553,6 +586,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddMarkingRoleAssignmentsPermissionDenied: Could not add the MarkingRoleAssignment. """ return self._api_client.stream_api( @@ -579,6 +614,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingRoleAssignmentsPermissionDenied": admin_errors.AddMarkingRoleAssignmentsPermissionDenied, + }, ), ) @@ -630,6 +668,7 @@ def list( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -687,6 +726,7 @@ def page( body_type=None, response_type=ListMarkingRoleAssignmentsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -713,6 +753,10 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PrincipalNotFound: A principal (User or Group) with the given PrincipalId could not be found + :raises RemoveMarkingRoleAssignmentsPermissionDenied: Could not remove the MarkingRoleAssignment. + :raises RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed: You cannot remove all administrators from a marking. """ return self._api_client.stream_api( @@ -739,5 +783,10 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PrincipalNotFound": admin_errors.PrincipalNotFound, + "RemoveMarkingRoleAssignmentsPermissionDenied": admin_errors.RemoveMarkingRoleAssignmentsPermissionDenied, + "RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed": admin_errors.RemoveMarkingRoleAssignmentsRemoveAllAdministratorsNotAllowed, + }, ), ) diff --git a/foundry/v2/admin/organization.py b/foundry/v2/admin/organization.py index a471bfecf..74c31b7ab 100644 --- a/foundry/v2/admin/organization.py +++ b/foundry/v2/admin/organization.py @@ -31,6 +31,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._host_name import HostName from foundry.v2.admin.models._organization import Organization from foundry.v2.admin.models._organization_name import OrganizationName @@ -79,6 +80,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Organization + + :raises OrganizationNotFound: The given Organization could not be found. """ return self._api_client.call_api( @@ -98,6 +101,9 @@ def get( body_type=None, response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, ), ).decode() @@ -130,6 +136,9 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Organization + + :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. + :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. """ return self._api_client.call_api( @@ -161,6 +170,10 @@ def replace( ), response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "InvalidHostName": admin_errors.InvalidHostName, + "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, + }, ), ).decode() @@ -202,6 +215,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Organization] + + :raises OrganizationNotFound: The given Organization could not be found. """ return self._api_client.call_api( @@ -221,6 +236,9 @@ def get( body_type=None, response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, ), ) @@ -253,6 +271,9 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Organization] + + :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. + :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. """ return self._api_client.call_api( @@ -284,6 +305,10 @@ def replace( ), response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "InvalidHostName": admin_errors.InvalidHostName, + "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, + }, ), ) @@ -325,6 +350,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Organization] + + :raises OrganizationNotFound: The given Organization could not be found. """ return self._api_client.stream_api( @@ -344,6 +371,9 @@ def get( body_type=None, response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, ), ) @@ -376,6 +406,9 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Organization] + + :raises InvalidHostName: The provided hostname must be a valid domain name. The only allowed characters are letters, numbers, periods, and hyphens. + :raises ReplaceOrganizationPermissionDenied: Could not replace the Organization. """ return self._api_client.stream_api( @@ -407,5 +440,9 @@ def replace( ), response_type=Organization, request_timeout=request_timeout, + throwable_errors={ + "InvalidHostName": admin_errors.InvalidHostName, + "ReplaceOrganizationPermissionDenied": admin_errors.ReplaceOrganizationPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/user.py b/foundry/v2/admin/user.py index a6d2910b9..4d3e79630 100644 --- a/foundry/v2/admin/user.py +++ b/foundry/v2/admin/user.py @@ -40,6 +40,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.group_membership import GroupMembershipClient from foundry.v2.admin.models._get_user_markings_response import GetUserMarkingsResponse from foundry.v2.admin.models._get_users_batch_request_element import ( @@ -101,6 +102,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteUserPermissionDenied: Could not delete the User. """ return self._api_client.call_api( @@ -116,6 +119,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, + }, ), ).decode() @@ -136,6 +142,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: User + + :raises UserNotFound: The given User could not be found. """ return self._api_client.call_api( @@ -153,6 +161,9 @@ def get( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "UserNotFound": admin_errors.UserNotFound, + }, ), ).decode() @@ -196,6 +207,7 @@ def get_batch( ], response_type=GetUsersBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -213,6 +225,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: User + + :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. """ return self._api_client.call_api( @@ -228,6 +242,9 @@ def get_current( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, + }, ), ).decode() @@ -251,6 +268,8 @@ def get_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: GetUserMarkingsResponse + + :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. """ return self._api_client.call_api( @@ -270,6 +289,9 @@ def get_markings( body_type=None, response_type=GetUserMarkingsResponse, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, + }, ), ).decode() @@ -313,6 +335,7 @@ def list( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -362,6 +385,7 @@ def page( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -389,6 +413,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BinaryStream + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ ... @@ -410,6 +437,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: bytes + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ ... @@ -437,6 +467,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ ... @@ -463,6 +496,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ if stream: @@ -489,6 +525,10 @@ def profile_picture( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={ + "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, + "InvalidProfilePicture": admin_errors.InvalidProfilePicture, + }, ), ).decode() @@ -515,6 +555,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: SearchUsersResponse + + :raises SearchUsersPermissionDenied: Could not search the User. """ return self._api_client.call_api( @@ -542,6 +584,9 @@ def search( ), response_type=SearchUsersResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, + }, ), ).decode() @@ -580,6 +625,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteUserPermissionDenied: Could not delete the User. """ return self._api_client.call_api( @@ -595,6 +642,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, + }, ), ) @@ -615,6 +665,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[User] + + :raises UserNotFound: The given User could not be found. """ return self._api_client.call_api( @@ -632,6 +684,9 @@ def get( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "UserNotFound": admin_errors.UserNotFound, + }, ), ) @@ -675,6 +730,7 @@ def get_batch( ], response_type=GetUsersBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -692,6 +748,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[User] + + :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. """ return self._api_client.call_api( @@ -707,6 +765,9 @@ def get_current( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, + }, ), ) @@ -730,6 +791,8 @@ def get_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[GetUserMarkingsResponse] + + :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. """ return self._api_client.call_api( @@ -749,6 +812,9 @@ def get_markings( body_type=None, response_type=GetUserMarkingsResponse, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, + }, ), ) @@ -792,6 +858,7 @@ def list( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -841,6 +908,7 @@ def page( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -861,6 +929,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[bytes] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ return self._api_client.call_api( @@ -878,6 +949,10 @@ def profile_picture( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, + "InvalidProfilePicture": admin_errors.InvalidProfilePicture, + }, ), ) @@ -904,6 +979,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[SearchUsersResponse] + + :raises SearchUsersPermissionDenied: Could not search the User. """ return self._api_client.call_api( @@ -931,6 +1008,9 @@ def search( ), response_type=SearchUsersResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, + }, ), ) @@ -969,6 +1049,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteUserPermissionDenied: Could not delete the User. """ return self._api_client.stream_api( @@ -984,6 +1066,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteUserPermissionDenied": admin_errors.DeleteUserPermissionDenied, + }, ), ) @@ -1004,6 +1089,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[User] + + :raises UserNotFound: The given User could not be found. """ return self._api_client.stream_api( @@ -1021,6 +1108,9 @@ def get( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "UserNotFound": admin_errors.UserNotFound, + }, ), ) @@ -1064,6 +1154,7 @@ def get_batch( ], response_type=GetUsersBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1081,6 +1172,8 @@ def get_current( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[User] + + :raises GetCurrentUserPermissionDenied: Could not getCurrent the User. """ return self._api_client.stream_api( @@ -1096,6 +1189,9 @@ def get_current( body_type=None, response_type=User, request_timeout=request_timeout, + throwable_errors={ + "GetCurrentUserPermissionDenied": admin_errors.GetCurrentUserPermissionDenied, + }, ), ) @@ -1119,6 +1215,8 @@ def get_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[GetUserMarkingsResponse] + + :raises GetMarkingsUserPermissionDenied: Could not getMarkings the User. """ return self._api_client.stream_api( @@ -1138,6 +1236,9 @@ def get_markings( body_type=None, response_type=GetUserMarkingsResponse, request_timeout=request_timeout, + throwable_errors={ + "GetMarkingsUserPermissionDenied": admin_errors.GetMarkingsUserPermissionDenied, + }, ), ) @@ -1181,6 +1282,7 @@ def list( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1230,6 +1332,7 @@ def page( body_type=None, response_type=ListUsersResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1250,6 +1353,9 @@ def profile_picture( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[bytes] + + :raises GetProfilePictureOfUserPermissionDenied: Could not profilePicture the User. + :raises InvalidProfilePicture: The user's profile picture is not a valid image """ return self._api_client.stream_api( @@ -1267,6 +1373,10 @@ def profile_picture( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "GetProfilePictureOfUserPermissionDenied": admin_errors.GetProfilePictureOfUserPermissionDenied, + "InvalidProfilePicture": admin_errors.InvalidProfilePicture, + }, ), ) @@ -1293,6 +1403,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[SearchUsersResponse] + + :raises SearchUsersPermissionDenied: Could not search the User. """ return self._api_client.stream_api( @@ -1320,5 +1432,8 @@ def search( ), response_type=SearchUsersResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchUsersPermissionDenied": admin_errors.SearchUsersPermissionDenied, + }, ), ) diff --git a/foundry/v2/admin/user_provider_info.py b/foundry/v2/admin/user_provider_info.py index 453b44a65..703f24187 100644 --- a/foundry/v2/admin/user_provider_info.py +++ b/foundry/v2/admin/user_provider_info.py @@ -31,6 +31,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.admin import errors as admin_errors from foundry.v2.admin.models._provider_id import ProviderId from foundry.v2.admin.models._user_provider_info import UserProviderInfo from foundry.v2.core.models._preview_mode import PreviewMode @@ -80,6 +81,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: UserProviderInfo + + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. """ return self._api_client.call_api( @@ -99,6 +102,9 @@ def get( body_type=None, response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, ), ).decode() @@ -125,6 +131,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: UserProviderInfo + + :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. """ return self._api_client.call_api( @@ -152,6 +160,9 @@ def replace( ), response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, + }, ), ).decode() @@ -193,6 +204,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[UserProviderInfo] + + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. """ return self._api_client.call_api( @@ -212,6 +225,9 @@ def get( body_type=None, response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, ), ) @@ -238,6 +254,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[UserProviderInfo] + + :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. """ return self._api_client.call_api( @@ -265,6 +283,9 @@ def replace( ), response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, + }, ), ) @@ -306,6 +327,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[UserProviderInfo] + + :raises UserProviderInfoNotFound: The given UserProviderInfo could not be found. """ return self._api_client.stream_api( @@ -325,6 +348,9 @@ def get( body_type=None, response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "UserProviderInfoNotFound": admin_errors.UserProviderInfoNotFound, + }, ), ) @@ -351,6 +377,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[UserProviderInfo] + + :raises ReplaceUserProviderInfoPermissionDenied: Could not replace the UserProviderInfo. """ return self._api_client.stream_api( @@ -378,5 +406,8 @@ def replace( ), response_type=UserProviderInfo, request_timeout=request_timeout, + throwable_errors={ + "ReplaceUserProviderInfoPermissionDenied": admin_errors.ReplaceUserProviderInfoPermissionDenied, + }, ), ) diff --git a/foundry/v2/aip_agents/agent.py b/foundry/v2/aip_agents/agent.py index 2ba8c2712..7779a0cc4 100644 --- a/foundry/v2/aip_agents/agent.py +++ b/foundry/v2/aip_agents/agent.py @@ -32,6 +32,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.aip_agents import errors as aip_agents_errors from foundry.v2.aip_agents.agent_version import AgentVersionClient from foundry.v2.aip_agents.models._agent import Agent from foundry.v2.aip_agents.models._agent_rid import AgentRid @@ -92,6 +93,8 @@ def all_sessions( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ResourceIterator[Session] + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ return self._api_client.iterate_api( @@ -111,6 +114,9 @@ def all_sessions( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ) @@ -139,6 +145,8 @@ def all_sessions_page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: AgentsSessionsPage + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ warnings.warn( @@ -164,6 +172,9 @@ def all_sessions_page( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ).decode() @@ -190,6 +201,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Agent + + :raises AgentNotFound: The given Agent could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. """ return self._api_client.call_api( @@ -210,6 +225,11 @@ def get( body_type=None, response_type=Agent, request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, ), ).decode() @@ -256,6 +276,8 @@ def all_sessions( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[AgentsSessionsPage] + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ return self._api_client.call_api( @@ -275,6 +297,9 @@ def all_sessions( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ) @@ -303,6 +328,8 @@ def all_sessions_page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[AgentsSessionsPage] + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ warnings.warn( @@ -328,6 +355,9 @@ def all_sessions_page( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ) @@ -354,6 +384,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Agent] + + :raises AgentNotFound: The given Agent could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. """ return self._api_client.call_api( @@ -374,6 +408,11 @@ def get( body_type=None, response_type=Agent, request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, ), ) @@ -420,6 +459,8 @@ def all_sessions( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[AgentsSessionsPage] + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ return self._api_client.stream_api( @@ -439,6 +480,9 @@ def all_sessions( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ) @@ -467,6 +511,8 @@ def all_sessions_page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[AgentsSessionsPage] + + :raises ListSessionsForAgentsPermissionDenied: Could not allSessions the Agent. """ warnings.warn( @@ -492,6 +538,9 @@ def all_sessions_page( body_type=None, response_type=AgentsSessionsPage, request_timeout=request_timeout, + throwable_errors={ + "ListSessionsForAgentsPermissionDenied": aip_agents_errors.ListSessionsForAgentsPermissionDenied, + }, ), ) @@ -518,6 +567,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Agent] + + :raises AgentNotFound: The given Agent could not be found. + :raises InvalidAgentVersion: The provided version string is not a valid format for an Agent version. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. """ return self._api_client.stream_api( @@ -538,5 +591,10 @@ def get( body_type=None, response_type=Agent, request_timeout=request_timeout, + throwable_errors={ + "AgentNotFound": aip_agents_errors.AgentNotFound, + "InvalidAgentVersion": aip_agents_errors.InvalidAgentVersion, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + }, ), ) diff --git a/foundry/v2/aip_agents/agent_version.py b/foundry/v2/aip_agents/agent_version.py index 2748322a5..36c7272ab 100644 --- a/foundry/v2/aip_agents/agent_version.py +++ b/foundry/v2/aip_agents/agent_version.py @@ -32,6 +32,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.aip_agents import errors as aip_agents_errors from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._agent_version import AgentVersion from foundry.v2.aip_agents.models._agent_version_string import AgentVersionString @@ -87,6 +88,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: AgentVersion + + :raises AgentVersionNotFound: The given AgentVersion could not be found. """ return self._api_client.call_api( @@ -107,6 +110,9 @@ def get( body_type=None, response_type=AgentVersion, request_timeout=request_timeout, + throwable_errors={ + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + }, ), ).decode() @@ -159,6 +165,7 @@ def list( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -217,6 +224,7 @@ def page( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -261,6 +269,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[AgentVersion] + + :raises AgentVersionNotFound: The given AgentVersion could not be found. """ return self._api_client.call_api( @@ -281,6 +291,9 @@ def get( body_type=None, response_type=AgentVersion, request_timeout=request_timeout, + throwable_errors={ + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + }, ), ) @@ -333,6 +346,7 @@ def list( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -391,6 +405,7 @@ def page( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -435,6 +450,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[AgentVersion] + + :raises AgentVersionNotFound: The given AgentVersion could not be found. """ return self._api_client.stream_api( @@ -455,6 +472,9 @@ def get( body_type=None, response_type=AgentVersion, request_timeout=request_timeout, + throwable_errors={ + "AgentVersionNotFound": aip_agents_errors.AgentVersionNotFound, + }, ), ) @@ -507,6 +527,7 @@ def list( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -565,5 +586,6 @@ def page( body_type=None, response_type=ListAgentVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/aip_agents/content.py b/foundry/v2/aip_agents/content.py index d148f23a0..2acff83cf 100644 --- a/foundry/v2/aip_agents/content.py +++ b/foundry/v2/aip_agents/content.py @@ -30,6 +30,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.aip_agents import errors as aip_agents_errors from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._content import Content from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -80,6 +81,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Content + + :raises ContentNotFound: The given Content could not be found. """ return self._api_client.call_api( @@ -100,6 +103,9 @@ def get( body_type=None, response_type=Content, request_timeout=request_timeout, + throwable_errors={ + "ContentNotFound": aip_agents_errors.ContentNotFound, + }, ), ).decode() @@ -144,6 +150,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Content] + + :raises ContentNotFound: The given Content could not be found. """ return self._api_client.call_api( @@ -164,6 +172,9 @@ def get( body_type=None, response_type=Content, request_timeout=request_timeout, + throwable_errors={ + "ContentNotFound": aip_agents_errors.ContentNotFound, + }, ), ) @@ -208,6 +219,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Content] + + :raises ContentNotFound: The given Content could not be found. """ return self._api_client.stream_api( @@ -228,5 +241,8 @@ def get( body_type=None, response_type=Content, request_timeout=request_timeout, + throwable_errors={ + "ContentNotFound": aip_agents_errors.ContentNotFound, + }, ), ) diff --git a/foundry/v2/aip_agents/errors/_agent_iterations_exceeded_limit.py b/foundry/v2/aip_agents/errors/_agent_iterations_exceeded_limit.py index 52737e11f..52fcc1d07 100644 --- a/foundry/v2/aip_agents/errors/_agent_iterations_exceeded_limit.py +++ b/foundry/v2/aip_agents/errors/_agent_iterations_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -44,7 +43,7 @@ class AgentIterationsExceededLimitParameters(TypedDict): @dataclass -class AgentIterationsExceededLimit(PalantirRPCException): +class AgentIterationsExceededLimit(BadRequestError): name: Literal["AgentIterationsExceededLimit"] parameters: AgentIterationsExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_agent_not_found.py b/foundry/v2/aip_agents/errors/_agent_not_found.py index 863dfb15f..9e9cc4dc4 100644 --- a/foundry/v2/aip_agents/errors/_agent_not_found.py +++ b/foundry/v2/aip_agents/errors/_agent_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid @@ -35,7 +34,7 @@ class AgentNotFoundParameters(TypedDict): @dataclass -class AgentNotFound(PalantirRPCException): +class AgentNotFound(NotFoundError): name: Literal["AgentNotFound"] parameters: AgentNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_agent_version_not_found.py b/foundry/v2/aip_agents/errors/_agent_version_not_found.py index d48c487f0..5751b0b6c 100644 --- a/foundry/v2/aip_agents/errors/_agent_version_not_found.py +++ b/foundry/v2/aip_agents/errors/_agent_version_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._agent_version_string import AgentVersionString @@ -33,13 +32,12 @@ class AgentVersionNotFoundParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - agentVersionString: AgentVersionString """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" @dataclass -class AgentVersionNotFound(PalantirRPCException): +class AgentVersionNotFound(NotFoundError): name: Literal["AgentVersionNotFound"] parameters: AgentVersionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_blocking_continue_session_permission_denied.py b/foundry/v2/aip_agents/errors/_blocking_continue_session_permission_denied.py index 2dcb16e34..a0f62f7f9 100644 --- a/foundry/v2/aip_agents/errors/_blocking_continue_session_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_blocking_continue_session_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class BlockingContinueSessionPermissionDeniedParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class BlockingContinueSessionPermissionDenied(PalantirRPCException): +class BlockingContinueSessionPermissionDenied(PermissionDeniedError): name: Literal["BlockingContinueSessionPermissionDenied"] parameters: BlockingContinueSessionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_cancel_session_failed_message_not_in_progress.py b/foundry/v2/aip_agents/errors/_cancel_session_failed_message_not_in_progress.py index 09ae7622a..1805e290c 100644 --- a/foundry/v2/aip_agents/errors/_cancel_session_failed_message_not_in_progress.py +++ b/foundry/v2/aip_agents/errors/_cancel_session_failed_message_not_in_progress.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._message_id import MessageId from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -44,14 +43,13 @@ class CancelSessionFailedMessageNotInProgressParameters(TypedDict): messageId: MessageId """The message identifier that was requested for cancellation.""" - agentRid: AgentRid sessionRid: SessionRid @dataclass -class CancelSessionFailedMessageNotInProgress(PalantirRPCException): +class CancelSessionFailedMessageNotInProgress(BadRequestError): name: Literal["CancelSessionFailedMessageNotInProgress"] parameters: CancelSessionFailedMessageNotInProgressParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_cancel_session_permission_denied.py b/foundry/v2/aip_agents/errors/_cancel_session_permission_denied.py index 62e87801e..ea58a6756 100644 --- a/foundry/v2/aip_agents/errors/_cancel_session_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_cancel_session_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class CancelSessionPermissionDeniedParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class CancelSessionPermissionDenied(PalantirRPCException): +class CancelSessionPermissionDenied(PermissionDeniedError): name: Literal["CancelSessionPermissionDenied"] parameters: CancelSessionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_content_not_found.py b/foundry/v2/aip_agents/errors/_content_not_found.py index a51920b89..841a35ca5 100644 --- a/foundry/v2/aip_agents/errors/_content_not_found.py +++ b/foundry/v2/aip_agents/errors/_content_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class ContentNotFoundParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class ContentNotFound(PalantirRPCException): +class ContentNotFound(NotFoundError): name: Literal["ContentNotFound"] parameters: ContentNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_context_size_exceeded_limit.py b/foundry/v2/aip_agents/errors/_context_size_exceeded_limit.py index 2d36aa3d7..7d7775ab2 100644 --- a/foundry/v2/aip_agents/errors/_context_size_exceeded_limit.py +++ b/foundry/v2/aip_agents/errors/_context_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -43,7 +42,7 @@ class ContextSizeExceededLimitParameters(TypedDict): @dataclass -class ContextSizeExceededLimit(PalantirRPCException): +class ContextSizeExceededLimit(BadRequestError): name: Literal["ContextSizeExceededLimit"] parameters: ContextSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_create_session_permission_denied.py b/foundry/v2/aip_agents/errors/_create_session_permission_denied.py index d5604d2fa..8dae887a2 100644 --- a/foundry/v2/aip_agents/errors/_create_session_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_create_session_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.aip_agents.models._agent_rid import AgentRid @@ -35,7 +34,7 @@ class CreateSessionPermissionDeniedParameters(TypedDict): @dataclass -class CreateSessionPermissionDenied(PalantirRPCException): +class CreateSessionPermissionDenied(PermissionDeniedError): name: Literal["CreateSessionPermissionDenied"] parameters: CreateSessionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_function_locator_not_found.py b/foundry/v2/aip_agents/errors/_function_locator_not_found.py index bc05c7141..a0bd5e401 100644 --- a/foundry/v2/aip_agents/errors/_function_locator_not_found.py +++ b/foundry/v2/aip_agents/errors/_function_locator_not_found.py @@ -18,12 +18,11 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -40,14 +39,13 @@ class FunctionLocatorNotFoundParameters(TypedDict): sessionRid: NotRequired[SessionRid] """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - functionRid: RID functionVersion: str @dataclass -class FunctionLocatorNotFound(PalantirRPCException): +class FunctionLocatorNotFound(NotFoundError): name: Literal["FunctionLocatorNotFound"] parameters: FunctionLocatorNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_get_all_sessions_agents_permission_denied.py b/foundry/v2/aip_agents/errors/_get_all_sessions_agents_permission_denied.py index cfc7dfa66..c836b015a 100644 --- a/foundry/v2/aip_agents/errors/_get_all_sessions_agents_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_get_all_sessions_agents_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class GetAllSessionsAgentsPermissionDeniedParameters(TypedDict): @@ -34,7 +33,7 @@ class GetAllSessionsAgentsPermissionDeniedParameters(TypedDict): @dataclass -class GetAllSessionsAgentsPermissionDenied(PalantirRPCException): +class GetAllSessionsAgentsPermissionDenied(PermissionDeniedError): name: Literal["GetAllSessionsAgentsPermissionDenied"] parameters: GetAllSessionsAgentsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_get_rag_context_for_session_permission_denied.py b/foundry/v2/aip_agents/errors/_get_rag_context_for_session_permission_denied.py index ea4faf656..767dba9f8 100644 --- a/foundry/v2/aip_agents/errors/_get_rag_context_for_session_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_get_rag_context_for_session_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class GetRagContextForSessionPermissionDeniedParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class GetRagContextForSessionPermissionDenied(PalantirRPCException): +class GetRagContextForSessionPermissionDenied(PermissionDeniedError): name: Literal["GetRagContextForSessionPermissionDenied"] parameters: GetRagContextForSessionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_invalid_agent_version.py b/foundry/v2/aip_agents/errors/_invalid_agent_version.py index 6d0a6b1ae..05ffa5fc9 100644 --- a/foundry/v2/aip_agents/errors/_invalid_agent_version.py +++ b/foundry/v2/aip_agents/errors/_invalid_agent_version.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._agent_version_string import AgentVersionString @@ -37,7 +36,7 @@ class InvalidAgentVersionParameters(TypedDict): @dataclass -class InvalidAgentVersion(PalantirRPCException): +class InvalidAgentVersion(BadRequestError): name: Literal["InvalidAgentVersion"] parameters: InvalidAgentVersionParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_invalid_parameter.py b/foundry/v2/aip_agents/errors/_invalid_parameter.py index a2de3131a..2d37ba545 100644 --- a/foundry/v2/aip_agents/errors/_invalid_parameter.py +++ b/foundry/v2/aip_agents/errors/_invalid_parameter.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._parameter_id import ParameterId from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -44,7 +43,7 @@ class InvalidParameterParameters(TypedDict): @dataclass -class InvalidParameter(PalantirRPCException): +class InvalidParameter(BadRequestError): name: Literal["InvalidParameter"] parameters: InvalidParameterParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_invalid_parameter_type.py b/foundry/v2/aip_agents/errors/_invalid_parameter_type.py index e798ef9de..51371176d 100644 --- a/foundry/v2/aip_agents/errors/_invalid_parameter_type.py +++ b/foundry/v2/aip_agents/errors/_invalid_parameter_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._parameter_id import ParameterId from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -48,7 +47,7 @@ class InvalidParameterTypeParameters(TypedDict): @dataclass -class InvalidParameterType(PalantirRPCException): +class InvalidParameterType(BadRequestError): name: Literal["InvalidParameterType"] parameters: InvalidParameterTypeParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_list_sessions_for_agents_permission_denied.py b/foundry/v2/aip_agents/errors/_list_sessions_for_agents_permission_denied.py index b4695eb07..51a9565d4 100644 --- a/foundry/v2/aip_agents/errors/_list_sessions_for_agents_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_list_sessions_for_agents_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class ListSessionsForAgentsPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class ListSessionsForAgentsPermissionDeniedParameters(TypedDict): @dataclass -class ListSessionsForAgentsPermissionDenied(PalantirRPCException): +class ListSessionsForAgentsPermissionDenied(PermissionDeniedError): name: Literal["ListSessionsForAgentsPermissionDenied"] parameters: ListSessionsForAgentsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_no_published_agent_version.py b/foundry/v2/aip_agents/errors/_no_published_agent_version.py index 2096f6f0b..b63d10ca8 100644 --- a/foundry/v2/aip_agents/errors/_no_published_agent_version.py +++ b/foundry/v2/aip_agents/errors/_no_published_agent_version.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid @@ -37,7 +36,7 @@ class NoPublishedAgentVersionParameters(TypedDict): @dataclass -class NoPublishedAgentVersion(PalantirRPCException): +class NoPublishedAgentVersion(BadRequestError): name: Literal["NoPublishedAgentVersion"] parameters: NoPublishedAgentVersionParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_object_type_ids_not_found.py b/foundry/v2/aip_agents/errors/_object_type_ids_not_found.py index 6d26c7cd6..a9e28aee5 100644 --- a/foundry/v2/aip_agents/errors/_object_type_ids_not_found.py +++ b/foundry/v2/aip_agents/errors/_object_type_ids_not_found.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid from foundry.v2.ontologies.models._object_type_id import ObjectTypeId @@ -42,12 +41,11 @@ class ObjectTypeIdsNotFoundParameters(TypedDict): sessionRid: NotRequired[SessionRid] """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - objectTypeIds: List[ObjectTypeId] @dataclass -class ObjectTypeIdsNotFound(PalantirRPCException): +class ObjectTypeIdsNotFound(NotFoundError): name: Literal["ObjectTypeIdsNotFound"] parameters: ObjectTypeIdsNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_object_type_rids_not_found.py b/foundry/v2/aip_agents/errors/_object_type_rids_not_found.py index f02f4e889..c1eb31ce0 100644 --- a/foundry/v2/aip_agents/errors/_object_type_rids_not_found.py +++ b/foundry/v2/aip_agents/errors/_object_type_rids_not_found.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid from foundry.v2.ontologies.models._object_type_rid import ObjectTypeRid @@ -42,12 +41,11 @@ class ObjectTypeRidsNotFoundParameters(TypedDict): sessionRid: NotRequired[SessionRid] """The session RID where the error occurred. This is omitted if the error occurred during session creation.""" - objectTypeRids: List[ObjectTypeRid] @dataclass -class ObjectTypeRidsNotFound(PalantirRPCException): +class ObjectTypeRidsNotFound(NotFoundError): name: Literal["ObjectTypeRidsNotFound"] parameters: ObjectTypeRidsNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_rate_limit_exceeded.py b/foundry/v2/aip_agents/errors/_rate_limit_exceeded.py index 1338937b6..563729db2 100644 --- a/foundry/v2/aip_agents/errors/_rate_limit_exceeded.py +++ b/foundry/v2/aip_agents/errors/_rate_limit_exceeded.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -40,7 +39,7 @@ class RateLimitExceededParameters(TypedDict): @dataclass -class RateLimitExceeded(PalantirRPCException): +class RateLimitExceeded(BadRequestError): name: Literal["RateLimitExceeded"] parameters: RateLimitExceededParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_session_execution_failed.py b/foundry/v2/aip_agents/errors/_session_execution_failed.py index 55bfaedde..330a432c8 100644 --- a/foundry/v2/aip_agents/errors/_session_execution_failed.py +++ b/foundry/v2/aip_agents/errors/_session_execution_failed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -37,13 +36,12 @@ class SessionExecutionFailedParameters(TypedDict): message: str """The error message.""" - details: str """Any additional details provided for the error.""" @dataclass -class SessionExecutionFailed(PalantirRPCException): +class SessionExecutionFailed(InternalServerError): name: Literal["SessionExecutionFailed"] parameters: SessionExecutionFailedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_session_not_found.py b/foundry/v2/aip_agents/errors/_session_not_found.py index dff6a0ed3..9c5a9fd94 100644 --- a/foundry/v2/aip_agents/errors/_session_not_found.py +++ b/foundry/v2/aip_agents/errors/_session_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class SessionNotFoundParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class SessionNotFound(PalantirRPCException): +class SessionNotFound(NotFoundError): name: Literal["SessionNotFound"] parameters: SessionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/errors/_streaming_continue_session_permission_denied.py b/foundry/v2/aip_agents/errors/_streaming_continue_session_permission_denied.py index ae4b309f9..aacb593ad 100644 --- a/foundry/v2/aip_agents/errors/_streaming_continue_session_permission_denied.py +++ b/foundry/v2/aip_agents/errors/_streaming_continue_session_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.aip_agents.models._agent_rid import AgentRid from foundry.v2.aip_agents.models._session_rid import SessionRid @@ -33,13 +32,12 @@ class StreamingContinueSessionPermissionDeniedParameters(TypedDict): agentRid: AgentRid """An RID identifying an AIP Agent created in [AIP Agent Studio](/docs/foundry/agent-studio/overview/).""" - sessionRid: SessionRid """The Resource Identifier (RID) of the conversation session.""" @dataclass -class StreamingContinueSessionPermissionDenied(PalantirRPCException): +class StreamingContinueSessionPermissionDenied(PermissionDeniedError): name: Literal["StreamingContinueSessionPermissionDenied"] parameters: StreamingContinueSessionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/aip_agents/session.py b/foundry/v2/aip_agents/session.py index 0348ab5d5..a645f2705 100644 --- a/foundry/v2/aip_agents/session.py +++ b/foundry/v2/aip_agents/session.py @@ -39,6 +39,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.aip_agents import errors as aip_agents_errors from foundry.v2.aip_agents.content import ContentClient from foundry.v2.aip_agents.models._agent_markdown_response import AgentMarkdownResponse from foundry.v2.aip_agents.models._agent_rid import AgentRid @@ -124,6 +125,17 @@ def blocking_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: SessionExchangeResult + + :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. + :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. + :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. + :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. """ return self._api_client.call_api( @@ -158,6 +170,18 @@ def blocking_continue( ), response_type=SessionExchangeResult, request_timeout=request_timeout, + throwable_errors={ + "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, + "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, + "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, + "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, + }, ), ).decode() @@ -193,6 +217,9 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: CancelSessionResponse + + :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. + :raises CancelSessionPermissionDenied: Could not cancel the Session. """ return self._api_client.call_api( @@ -223,6 +250,10 @@ def cancel( ), response_type=CancelSessionResponse, request_timeout=request_timeout, + throwable_errors={ + "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, + "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, + }, ), ).decode() @@ -251,6 +282,12 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Session + + :raises CreateSessionPermissionDenied: Could not create the Session. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.call_api( @@ -278,6 +315,13 @@ def create( ), response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ).decode() @@ -304,6 +348,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Session + + :raises SessionNotFound: The given Session could not be found. """ return self._api_client.call_api( @@ -324,6 +370,9 @@ def get( body_type=None, response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, ), ).decode() @@ -378,6 +427,7 @@ def list( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -438,6 +488,7 @@ def page( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -472,6 +523,11 @@ def rag_context( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: AgentSessionRagContextResponse + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.call_api( @@ -504,6 +560,12 @@ def rag_context( ), response_type=AgentSessionRagContextResponse, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ).decode() @@ -556,6 +618,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BinaryStream + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ ... @@ -602,6 +671,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: bytes + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ ... @@ -654,6 +730,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ ... @@ -705,6 +788,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ if stream: @@ -750,6 +840,14 @@ def streaming_continue( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, + }, ), ).decode() @@ -809,6 +907,17 @@ def blocking_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[SessionExchangeResult] + + :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. + :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. + :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. + :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. """ return self._api_client.call_api( @@ -843,6 +952,18 @@ def blocking_continue( ), response_type=SessionExchangeResult, request_timeout=request_timeout, + throwable_errors={ + "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, + "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, + "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, + "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, + }, ), ) @@ -878,6 +999,9 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[CancelSessionResponse] + + :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. + :raises CancelSessionPermissionDenied: Could not cancel the Session. """ return self._api_client.call_api( @@ -908,6 +1032,10 @@ def cancel( ), response_type=CancelSessionResponse, request_timeout=request_timeout, + throwable_errors={ + "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, + "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, + }, ), ) @@ -936,6 +1064,12 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Session] + + :raises CreateSessionPermissionDenied: Could not create the Session. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.call_api( @@ -963,6 +1097,13 @@ def create( ), response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ) @@ -989,6 +1130,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Session] + + :raises SessionNotFound: The given Session could not be found. """ return self._api_client.call_api( @@ -1009,6 +1152,9 @@ def get( body_type=None, response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, ), ) @@ -1063,6 +1209,7 @@ def list( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1123,6 +1270,7 @@ def page( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1157,6 +1305,11 @@ def rag_context( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[AgentSessionRagContextResponse] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.call_api( @@ -1189,6 +1342,12 @@ def rag_context( ), response_type=AgentSessionRagContextResponse, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ) @@ -1234,6 +1393,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[bytes] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ return self._api_client.call_api( @@ -1270,6 +1436,14 @@ def streaming_continue( ), response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, + }, ), ) @@ -1329,6 +1503,17 @@ def blocking_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[SessionExchangeResult] + + :raises AgentIterationsExceededLimit: The Agent was unable to produce an answer in the set number of maximum iterations. This can happen if the Agent gets confused or stuck in a loop, or if the query is too complex. Try a different query or review the Agent configuration in AIP Agent Studio. + :raises BlockingContinueSessionPermissionDenied: Could not blockingContinue the Session. + :raises ContextSizeExceededLimit: Failed to generate a response for a session because the context size of the LLM has been exceeded. Clients should either retry with a shorter message or create a new session and try re-sending the message. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises RateLimitExceeded: Failed to generate a response as the model rate limits were exceeded. Clients should wait and retry. + :raises SessionExecutionFailed: Failed to generate a response for a session due to an unexpected error. """ return self._api_client.stream_api( @@ -1363,6 +1548,18 @@ def blocking_continue( ), response_type=SessionExchangeResult, request_timeout=request_timeout, + throwable_errors={ + "AgentIterationsExceededLimit": aip_agents_errors.AgentIterationsExceededLimit, + "BlockingContinueSessionPermissionDenied": aip_agents_errors.BlockingContinueSessionPermissionDenied, + "ContextSizeExceededLimit": aip_agents_errors.ContextSizeExceededLimit, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "RateLimitExceeded": aip_agents_errors.RateLimitExceeded, + "SessionExecutionFailed": aip_agents_errors.SessionExecutionFailed, + }, ), ) @@ -1398,6 +1595,9 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[CancelSessionResponse] + + :raises CancelSessionFailedMessageNotInProgress: Unable to cancel the requested session exchange as no in-progress exchange was found for the provided message identifier. This is expected if no exchange was initiated with the provided message identifier through a `streamingContinue` request, or if the exchange for this identifier has already completed and cannot be canceled, or if the exchange has already been canceled. This error can also occur if the cancellation was requested immediately after requesting the exchange through a `streamingContinue` request, and the exchange has not started yet. Clients should handle these errors gracefully, and can reload the session content to get the latest conversation state. + :raises CancelSessionPermissionDenied: Could not cancel the Session. """ return self._api_client.stream_api( @@ -1428,6 +1628,10 @@ def cancel( ), response_type=CancelSessionResponse, request_timeout=request_timeout, + throwable_errors={ + "CancelSessionFailedMessageNotInProgress": aip_agents_errors.CancelSessionFailedMessageNotInProgress, + "CancelSessionPermissionDenied": aip_agents_errors.CancelSessionPermissionDenied, + }, ), ) @@ -1456,6 +1660,12 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Session] + + :raises CreateSessionPermissionDenied: Could not create the Session. + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises NoPublishedAgentVersion: Failed to retrieve the latest published version of the Agent because the Agent has no published versions. Try publishing the Agent in AIP Agent Studio to use the latest published version, or specify the version of the Agent to use. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.stream_api( @@ -1483,6 +1693,13 @@ def create( ), response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "CreateSessionPermissionDenied": aip_agents_errors.CreateSessionPermissionDenied, + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "NoPublishedAgentVersion": aip_agents_errors.NoPublishedAgentVersion, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ) @@ -1509,6 +1726,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Session] + + :raises SessionNotFound: The given Session could not be found. """ return self._api_client.stream_api( @@ -1529,6 +1748,9 @@ def get( body_type=None, response_type=Session, request_timeout=request_timeout, + throwable_errors={ + "SessionNotFound": aip_agents_errors.SessionNotFound, + }, ), ) @@ -1583,6 +1805,7 @@ def list( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1643,6 +1866,7 @@ def page( body_type=None, response_type=ListSessionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1677,6 +1901,11 @@ def rag_context( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[AgentSessionRagContextResponse] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises GetRagContextForSessionPermissionDenied: Could not ragContext the Session. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). """ return self._api_client.stream_api( @@ -1709,6 +1938,12 @@ def rag_context( ), response_type=AgentSessionRagContextResponse, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "GetRagContextForSessionPermissionDenied": aip_agents_errors.GetRagContextForSessionPermissionDenied, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + }, ), ) @@ -1754,6 +1989,13 @@ def streaming_continue( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[bytes] + + :raises FunctionLocatorNotFound: The specified function locator is configured for use by the Agent but could not be found. The function type or version may not exist or the client token does not have access. + :raises InvalidParameter: The provided application variable is not valid for the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises InvalidParameterType: The provided value does not match the expected type for the application variable configured on the Agent for this session. Check the available application variables for the Agent under the `parameters` property, and version through the API with `getAgent`, or in AIP Agent Studio. The Agent version used for the session can be checked through the API with `getSession`. + :raises ObjectTypeIdsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises ObjectTypeRidsNotFound: Some object types are configured for use by the Agent but could not be found. The object types either do not exist or the client token does not have access. Object types can be checked by listing available object types through the API, or searching in [Ontology Manager](/docs/foundry/ontology-manager/overview/). + :raises StreamingContinueSessionPermissionDenied: Could not streamingContinue the Session. """ return self._api_client.stream_api( @@ -1790,5 +2032,13 @@ def streaming_continue( ), response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "FunctionLocatorNotFound": aip_agents_errors.FunctionLocatorNotFound, + "InvalidParameter": aip_agents_errors.InvalidParameter, + "InvalidParameterType": aip_agents_errors.InvalidParameterType, + "ObjectTypeIdsNotFound": aip_agents_errors.ObjectTypeIdsNotFound, + "ObjectTypeRidsNotFound": aip_agents_errors.ObjectTypeRidsNotFound, + "StreamingContinueSessionPermissionDenied": aip_agents_errors.StreamingContinueSessionPermissionDenied, + }, ), ) diff --git a/foundry/v2/connectivity/connection.py b/foundry/v2/connectivity/connection.py index 9df59200c..144c6c7d2 100644 --- a/foundry/v2/connectivity/connection.py +++ b/foundry/v2/connectivity/connection.py @@ -32,6 +32,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.connectivity import errors as connectivity_errors from foundry.v2.connectivity.file_import import FileImportClient from foundry.v2.connectivity.models._connection import Connection from foundry.v2.connectivity.models._connection_display_name import ConnectionDisplayName # NOQA @@ -120,6 +121,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Connection + + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises CreateConnectionPermissionDenied: Could not create the Connection. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + :raises PropertyCannotBeBlank: The specified property cannot be blank. """ return self._api_client.call_api( @@ -157,6 +163,12 @@ def create( ), response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, + }, ), ).decode() @@ -180,6 +192,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Connection + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. """ return self._api_client.call_api( @@ -199,6 +215,11 @@ def get( body_type=None, response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + }, ), ).decode() @@ -236,6 +257,9 @@ def update_secrets( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. + :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. """ return self._api_client.call_api( @@ -262,6 +286,10 @@ def update_secrets( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, + "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, + }, ), ).decode() @@ -325,6 +353,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Connection] + + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises CreateConnectionPermissionDenied: Could not create the Connection. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + :raises PropertyCannotBeBlank: The specified property cannot be blank. """ return self._api_client.call_api( @@ -362,6 +395,12 @@ def create( ), response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, + }, ), ) @@ -385,6 +424,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Connection] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. """ return self._api_client.call_api( @@ -404,6 +447,11 @@ def get( body_type=None, response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + }, ), ) @@ -441,6 +489,9 @@ def update_secrets( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. + :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. """ return self._api_client.call_api( @@ -467,6 +518,10 @@ def update_secrets( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, + "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, + }, ), ) @@ -530,6 +585,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Connection] + + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises CreateConnectionPermissionDenied: Could not create the Connection. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. + :raises PropertyCannotBeBlank: The specified property cannot be blank. """ return self._api_client.stream_api( @@ -567,6 +627,12 @@ def create( ), response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "CreateConnectionPermissionDenied": connectivity_errors.CreateConnectionPermissionDenied, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + "PropertyCannotBeBlank": connectivity_errors.PropertyCannotBeBlank, + }, ), ) @@ -590,6 +656,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Connection] + + :raises ConnectionNotFound: The given Connection could not be found. + :raises ConnectionTypeNotSupported: The specified connection is not yet supported in the Platform API. + :raises ParentFolderNotFoundForConnection: The parent folder for the specified connection could not be found. """ return self._api_client.stream_api( @@ -609,6 +679,11 @@ def get( body_type=None, response_type=Connection, request_timeout=request_timeout, + throwable_errors={ + "ConnectionNotFound": connectivity_errors.ConnectionNotFound, + "ConnectionTypeNotSupported": connectivity_errors.ConnectionTypeNotSupported, + "ParentFolderNotFoundForConnection": connectivity_errors.ParentFolderNotFoundForConnection, + }, ), ) @@ -646,6 +721,9 @@ def update_secrets( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises SecretNamesDoNotExist: The secret names provided do not exist on the connection. + :raises UpdateSecretsForConnectionPermissionDenied: Could not update secrets for the Connection. """ return self._api_client.stream_api( @@ -672,5 +750,9 @@ def update_secrets( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "SecretNamesDoNotExist": connectivity_errors.SecretNamesDoNotExist, + "UpdateSecretsForConnectionPermissionDenied": connectivity_errors.UpdateSecretsForConnectionPermissionDenied, + }, ), ) diff --git a/foundry/v2/connectivity/errors/_changing_branch_name_not_supported_for_imports.py b/foundry/v2/connectivity/errors/_changing_branch_name_not_supported_for_imports.py index ed81c0289..dd75ca70a 100644 --- a/foundry/v2/connectivity/errors/_changing_branch_name_not_supported_for_imports.py +++ b/foundry/v2/connectivity/errors/_changing_branch_name_not_supported_for_imports.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._branch_name import BranchName @@ -37,7 +36,7 @@ class ChangingBranchNameNotSupportedForImportsParameters(TypedDict): @dataclass -class ChangingBranchNameNotSupportedForImports(PalantirRPCException): +class ChangingBranchNameNotSupportedForImports(BadRequestError): name: Literal["ChangingBranchNameNotSupportedForImports"] parameters: ChangingBranchNameNotSupportedForImportsParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_changing_output_dataset_not_supported_for_imports.py b/foundry/v2/connectivity/errors/_changing_output_dataset_not_supported_for_imports.py index c6a709242..39841c535 100644 --- a/foundry/v2/connectivity/errors/_changing_output_dataset_not_supported_for_imports.py +++ b/foundry/v2/connectivity/errors/_changing_output_dataset_not_supported_for_imports.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -36,7 +35,7 @@ class ChangingOutputDatasetNotSupportedForImportsParameters(TypedDict): @dataclass -class ChangingOutputDatasetNotSupportedForImports(PalantirRPCException): +class ChangingOutputDatasetNotSupportedForImports(BadRequestError): name: Literal["ChangingOutputDatasetNotSupportedForImports"] parameters: ChangingOutputDatasetNotSupportedForImportsParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_connection_details_not_determined.py b/foundry/v2/connectivity/errors/_connection_details_not_determined.py index 22deb98d3..c9d354957 100644 --- a/foundry/v2/connectivity/errors/_connection_details_not_determined.py +++ b/foundry/v2/connectivity/errors/_connection_details_not_determined.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -36,7 +35,7 @@ class ConnectionDetailsNotDeterminedParameters(TypedDict): @dataclass -class ConnectionDetailsNotDetermined(PalantirRPCException): +class ConnectionDetailsNotDetermined(InternalServerError): name: Literal["ConnectionDetailsNotDetermined"] parameters: ConnectionDetailsNotDeterminedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_connection_not_found.py b/foundry/v2/connectivity/errors/_connection_not_found.py index 6035faae7..296fa3b72 100644 --- a/foundry/v2/connectivity/errors/_connection_not_found.py +++ b/foundry/v2/connectivity/errors/_connection_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class ConnectionNotFoundParameters(TypedDict): @dataclass -class ConnectionNotFound(PalantirRPCException): +class ConnectionNotFound(NotFoundError): name: Literal["ConnectionNotFound"] parameters: ConnectionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_connection_type_not_supported.py b/foundry/v2/connectivity/errors/_connection_type_not_supported.py index 0793972ee..f99389c05 100644 --- a/foundry/v2/connectivity/errors/_connection_type_not_supported.py +++ b/foundry/v2/connectivity/errors/_connection_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError class ConnectionTypeNotSupportedParameters(TypedDict): @@ -33,7 +32,7 @@ class ConnectionTypeNotSupportedParameters(TypedDict): @dataclass -class ConnectionTypeNotSupported(PalantirRPCException): +class ConnectionTypeNotSupported(InternalServerError): name: Literal["ConnectionTypeNotSupported"] parameters: ConnectionTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_create_connection_permission_denied.py b/foundry/v2/connectivity/errors/_create_connection_permission_denied.py index 36f608b36..3ca563890 100644 --- a/foundry/v2/connectivity/errors/_create_connection_permission_denied.py +++ b/foundry/v2/connectivity/errors/_create_connection_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateConnectionPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateConnectionPermissionDeniedParameters(TypedDict): @dataclass -class CreateConnectionPermissionDenied(PalantirRPCException): +class CreateConnectionPermissionDenied(PermissionDeniedError): name: Literal["CreateConnectionPermissionDenied"] parameters: CreateConnectionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_create_file_import_permission_denied.py b/foundry/v2/connectivity/errors/_create_file_import_permission_denied.py index e6543819c..25d1491af 100644 --- a/foundry/v2/connectivity/errors/_create_file_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_create_file_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class CreateFileImportPermissionDeniedParameters(TypedDict): @dataclass -class CreateFileImportPermissionDenied(PalantirRPCException): +class CreateFileImportPermissionDenied(PermissionDeniedError): name: Literal["CreateFileImportPermissionDenied"] parameters: CreateFileImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_create_table_import_permission_denied.py b/foundry/v2/connectivity/errors/_create_table_import_permission_denied.py index 2dcac5579..80661365b 100644 --- a/foundry/v2/connectivity/errors/_create_table_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_create_table_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class CreateTableImportPermissionDeniedParameters(TypedDict): @dataclass -class CreateTableImportPermissionDenied(PalantirRPCException): +class CreateTableImportPermissionDenied(PermissionDeniedError): name: Literal["CreateTableImportPermissionDenied"] parameters: CreateTableImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_delete_file_import_permission_denied.py b/foundry/v2/connectivity/errors/_delete_file_import_permission_denied.py index f2140dc9f..9cf9f762e 100644 --- a/foundry/v2/connectivity/errors/_delete_file_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_delete_file_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._file_import_rid import FileImportRid @@ -37,7 +36,7 @@ class DeleteFileImportPermissionDeniedParameters(TypedDict): @dataclass -class DeleteFileImportPermissionDenied(PalantirRPCException): +class DeleteFileImportPermissionDenied(PermissionDeniedError): name: Literal["DeleteFileImportPermissionDenied"] parameters: DeleteFileImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_delete_table_import_permission_denied.py b/foundry/v2/connectivity/errors/_delete_table_import_permission_denied.py index 9481381dd..0185b22d7 100644 --- a/foundry/v2/connectivity/errors/_delete_table_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_delete_table_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._table_import_rid import TableImportRid @@ -37,7 +36,7 @@ class DeleteTableImportPermissionDeniedParameters(TypedDict): @dataclass -class DeleteTableImportPermissionDenied(PalantirRPCException): +class DeleteTableImportPermissionDenied(PermissionDeniedError): name: Literal["DeleteTableImportPermissionDenied"] parameters: DeleteTableImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_encrypted_property_must_be_specified_as_plaintext_value.py b/foundry/v2/connectivity/errors/_encrypted_property_must_be_specified_as_plaintext_value.py index c837a47ce..b5b10578e 100644 --- a/foundry/v2/connectivity/errors/_encrypted_property_must_be_specified_as_plaintext_value.py +++ b/foundry/v2/connectivity/errors/_encrypted_property_must_be_specified_as_plaintext_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters(TypedDict): @@ -33,7 +32,7 @@ class EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters(TypedDict): @dataclass -class EncryptedPropertyMustBeSpecifiedAsPlaintextValue(PalantirRPCException): +class EncryptedPropertyMustBeSpecifiedAsPlaintextValue(BadRequestError): name: Literal["EncryptedPropertyMustBeSpecifiedAsPlaintextValue"] parameters: EncryptedPropertyMustBeSpecifiedAsPlaintextValueParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_execute_file_import_permission_denied.py b/foundry/v2/connectivity/errors/_execute_file_import_permission_denied.py index 6fafbb5dd..c5481c0f4 100644 --- a/foundry/v2/connectivity/errors/_execute_file_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_execute_file_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._file_import_rid import FileImportRid @@ -37,7 +36,7 @@ class ExecuteFileImportPermissionDeniedParameters(TypedDict): @dataclass -class ExecuteFileImportPermissionDenied(PalantirRPCException): +class ExecuteFileImportPermissionDenied(PermissionDeniedError): name: Literal["ExecuteFileImportPermissionDenied"] parameters: ExecuteFileImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_execute_table_import_permission_denied.py b/foundry/v2/connectivity/errors/_execute_table_import_permission_denied.py index e1d18329b..0e21d4485 100644 --- a/foundry/v2/connectivity/errors/_execute_table_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_execute_table_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._table_import_rid import TableImportRid @@ -37,7 +36,7 @@ class ExecuteTableImportPermissionDeniedParameters(TypedDict): @dataclass -class ExecuteTableImportPermissionDenied(PalantirRPCException): +class ExecuteTableImportPermissionDenied(PermissionDeniedError): name: Literal["ExecuteTableImportPermissionDenied"] parameters: ExecuteTableImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_at_least_count_filter_invalid_min_count.py b/foundry/v2/connectivity/errors/_file_at_least_count_filter_invalid_min_count.py index d3d11e077..aeea8b1f0 100644 --- a/foundry/v2/connectivity/errors/_file_at_least_count_filter_invalid_min_count.py +++ b/foundry/v2/connectivity/errors/_file_at_least_count_filter_invalid_min_count.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FileAtLeastCountFilterInvalidMinCountParameters(TypedDict): @@ -33,7 +32,7 @@ class FileAtLeastCountFilterInvalidMinCountParameters(TypedDict): @dataclass -class FileAtLeastCountFilterInvalidMinCount(PalantirRPCException): +class FileAtLeastCountFilterInvalidMinCount(BadRequestError): name: Literal["FileAtLeastCountFilterInvalidMinCount"] parameters: FileAtLeastCountFilterInvalidMinCountParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_import_custom_filter_cannot_be_used_to_create_or_update_file_imports.py b/foundry/v2/connectivity/errors/_file_import_custom_filter_cannot_be_used_to_create_or_update_file_imports.py index cdc65f17b..91064d811 100644 --- a/foundry/v2/connectivity/errors/_file_import_custom_filter_cannot_be_used_to_create_or_update_file_imports.py +++ b/foundry/v2/connectivity/errors/_file_import_custom_filter_cannot_be_used_to_create_or_update_file_imports.py @@ -19,10 +19,9 @@ from typing import Any from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters(TypedDict): @@ -37,7 +36,7 @@ class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters(Ty @dataclass -class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports(PalantirRPCException): +class FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports(BadRequestError): name: Literal["FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports"] parameters: FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImportsParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_import_not_found.py b/foundry/v2/connectivity/errors/_file_import_not_found.py index c45d0ec64..f2223addc 100644 --- a/foundry/v2/connectivity/errors/_file_import_not_found.py +++ b/foundry/v2/connectivity/errors/_file_import_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._file_import_rid import FileImportRid @@ -37,7 +36,7 @@ class FileImportNotFoundParameters(TypedDict): @dataclass -class FileImportNotFound(PalantirRPCException): +class FileImportNotFound(NotFoundError): name: Literal["FileImportNotFound"] parameters: FileImportNotFoundParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_import_not_supported_for_connection.py b/foundry/v2/connectivity/errors/_file_import_not_supported_for_connection.py index 3322e90f0..83ef31f3a 100644 --- a/foundry/v2/connectivity/errors/_file_import_not_supported_for_connection.py +++ b/foundry/v2/connectivity/errors/_file_import_not_supported_for_connection.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class FileImportNotSupportedForConnectionParameters(TypedDict): @dataclass -class FileImportNotSupportedForConnection(PalantirRPCException): +class FileImportNotSupportedForConnection(BadRequestError): name: Literal["FileImportNotSupportedForConnection"] parameters: FileImportNotSupportedForConnectionParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_size_filter_greater_than_cannot_be_negative.py b/foundry/v2/connectivity/errors/_file_size_filter_greater_than_cannot_be_negative.py index 25ab8ba46..d5bd39f0c 100644 --- a/foundry/v2/connectivity/errors/_file_size_filter_greater_than_cannot_be_negative.py +++ b/foundry/v2/connectivity/errors/_file_size_filter_greater_than_cannot_be_negative.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._size_bytes import SizeBytes @@ -34,7 +33,7 @@ class FileSizeFilterGreaterThanCannotBeNegativeParameters(TypedDict): @dataclass -class FileSizeFilterGreaterThanCannotBeNegative(PalantirRPCException): +class FileSizeFilterGreaterThanCannotBeNegative(BadRequestError): name: Literal["FileSizeFilterGreaterThanCannotBeNegative"] parameters: FileSizeFilterGreaterThanCannotBeNegativeParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_size_filter_invalid_greater_than_and_less_than_range.py b/foundry/v2/connectivity/errors/_file_size_filter_invalid_greater_than_and_less_than_range.py index 57022696e..0ecc79a2b 100644 --- a/foundry/v2/connectivity/errors/_file_size_filter_invalid_greater_than_and_less_than_range.py +++ b/foundry/v2/connectivity/errors/_file_size_filter_invalid_greater_than_and_less_than_range.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._size_bytes import SizeBytes @@ -39,7 +38,7 @@ class FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters(TypedDict): @dataclass -class FileSizeFilterInvalidGreaterThanAndLessThanRange(PalantirRPCException): +class FileSizeFilterInvalidGreaterThanAndLessThanRange(BadRequestError): name: Literal["FileSizeFilterInvalidGreaterThanAndLessThanRange"] parameters: FileSizeFilterInvalidGreaterThanAndLessThanRangeParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_size_filter_less_than_must_be_one_byte_or_larger.py b/foundry/v2/connectivity/errors/_file_size_filter_less_than_must_be_one_byte_or_larger.py index a0f830be4..f803bf1ee 100644 --- a/foundry/v2/connectivity/errors/_file_size_filter_less_than_must_be_one_byte_or_larger.py +++ b/foundry/v2/connectivity/errors/_file_size_filter_less_than_must_be_one_byte_or_larger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._size_bytes import SizeBytes @@ -34,7 +33,7 @@ class FileSizeFilterLessThanMustBeOneByteOrLargerParameters(TypedDict): @dataclass -class FileSizeFilterLessThanMustBeOneByteOrLarger(PalantirRPCException): +class FileSizeFilterLessThanMustBeOneByteOrLarger(BadRequestError): name: Literal["FileSizeFilterLessThanMustBeOneByteOrLarger"] parameters: FileSizeFilterLessThanMustBeOneByteOrLargerParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_file_size_filter_missing_greater_than_and_less_than.py b/foundry/v2/connectivity/errors/_file_size_filter_missing_greater_than_and_less_than.py index be2069045..b522a847b 100644 --- a/foundry/v2/connectivity/errors/_file_size_filter_missing_greater_than_and_less_than.py +++ b/foundry/v2/connectivity/errors/_file_size_filter_missing_greater_than_and_less_than.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FileSizeFilterMissingGreaterThanAndLessThanParameters(TypedDict): @@ -34,7 +33,7 @@ class FileSizeFilterMissingGreaterThanAndLessThanParameters(TypedDict): @dataclass -class FileSizeFilterMissingGreaterThanAndLessThan(PalantirRPCException): +class FileSizeFilterMissingGreaterThanAndLessThan(BadRequestError): name: Literal["FileSizeFilterMissingGreaterThanAndLessThan"] parameters: FileSizeFilterMissingGreaterThanAndLessThanParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_files_count_limit_filter_invalid_limit.py b/foundry/v2/connectivity/errors/_files_count_limit_filter_invalid_limit.py index 1b20a5806..d4477a4ea 100644 --- a/foundry/v2/connectivity/errors/_files_count_limit_filter_invalid_limit.py +++ b/foundry/v2/connectivity/errors/_files_count_limit_filter_invalid_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FilesCountLimitFilterInvalidLimitParameters(TypedDict): @@ -33,7 +32,7 @@ class FilesCountLimitFilterInvalidLimitParameters(TypedDict): @dataclass -class FilesCountLimitFilterInvalidLimit(PalantirRPCException): +class FilesCountLimitFilterInvalidLimit(BadRequestError): name: Literal["FilesCountLimitFilterInvalidLimit"] parameters: FilesCountLimitFilterInvalidLimitParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_parent_folder_not_found_for_connection.py b/foundry/v2/connectivity/errors/_parent_folder_not_found_for_connection.py index 0624a085a..259f0c3e8 100644 --- a/foundry/v2/connectivity/errors/_parent_folder_not_found_for_connection.py +++ b/foundry/v2/connectivity/errors/_parent_folder_not_found_for_connection.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class ParentFolderNotFoundForConnectionParameters(TypedDict): @dataclass -class ParentFolderNotFoundForConnection(PalantirRPCException): +class ParentFolderNotFoundForConnection(NotFoundError): name: Literal["ParentFolderNotFoundForConnection"] parameters: ParentFolderNotFoundForConnectionParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_property_cannot_be_blank.py b/foundry/v2/connectivity/errors/_property_cannot_be_blank.py index 0a86689af..c00b3e122 100644 --- a/foundry/v2/connectivity/errors/_property_cannot_be_blank.py +++ b/foundry/v2/connectivity/errors/_property_cannot_be_blank.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class PropertyCannotBeBlankParameters(TypedDict): @@ -33,7 +32,7 @@ class PropertyCannotBeBlankParameters(TypedDict): @dataclass -class PropertyCannotBeBlank(PalantirRPCException): +class PropertyCannotBeBlank(BadRequestError): name: Literal["PropertyCannotBeBlank"] parameters: PropertyCannotBeBlankParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_replace_file_import_permission_denied.py b/foundry/v2/connectivity/errors/_replace_file_import_permission_denied.py index 040f8a345..6c4c06d8a 100644 --- a/foundry/v2/connectivity/errors/_replace_file_import_permission_denied.py +++ b/foundry/v2/connectivity/errors/_replace_file_import_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._file_import_rid import FileImportRid @@ -37,7 +36,7 @@ class ReplaceFileImportPermissionDeniedParameters(TypedDict): @dataclass -class ReplaceFileImportPermissionDenied(PalantirRPCException): +class ReplaceFileImportPermissionDenied(PermissionDeniedError): name: Literal["ReplaceFileImportPermissionDenied"] parameters: ReplaceFileImportPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_secret_names_do_not_exist.py b/foundry/v2/connectivity/errors/_secret_names_do_not_exist.py index 8f867d89d..6c4d628f5 100644 --- a/foundry/v2/connectivity/errors/_secret_names_do_not_exist.py +++ b/foundry/v2/connectivity/errors/_secret_names_do_not_exist.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._secret_name import SecretName @@ -38,7 +37,7 @@ class SecretNamesDoNotExistParameters(TypedDict): @dataclass -class SecretNamesDoNotExist(PalantirRPCException): +class SecretNamesDoNotExist(BadRequestError): name: Literal["SecretNamesDoNotExist"] parameters: SecretNamesDoNotExistParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_table_import_not_found.py b/foundry/v2/connectivity/errors/_table_import_not_found.py index 05fabbada..54d1ea6d7 100644 --- a/foundry/v2/connectivity/errors/_table_import_not_found.py +++ b/foundry/v2/connectivity/errors/_table_import_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._table_import_rid import TableImportRid @@ -37,7 +36,7 @@ class TableImportNotFoundParameters(TypedDict): @dataclass -class TableImportNotFound(PalantirRPCException): +class TableImportNotFound(NotFoundError): name: Literal["TableImportNotFound"] parameters: TableImportNotFoundParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_table_import_not_supported_for_connection.py b/foundry/v2/connectivity/errors/_table_import_not_supported_for_connection.py index 17dc68451..0ce857b2a 100644 --- a/foundry/v2/connectivity/errors/_table_import_not_supported_for_connection.py +++ b/foundry/v2/connectivity/errors/_table_import_not_supported_for_connection.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -36,7 +35,7 @@ class TableImportNotSupportedForConnectionParameters(TypedDict): @dataclass -class TableImportNotSupportedForConnection(PalantirRPCException): +class TableImportNotSupportedForConnection(BadRequestError): name: Literal["TableImportNotSupportedForConnection"] parameters: TableImportNotSupportedForConnectionParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_table_import_type_not_supported.py b/foundry/v2/connectivity/errors/_table_import_type_not_supported.py index 7b8265e68..f87c958bb 100644 --- a/foundry/v2/connectivity/errors/_table_import_type_not_supported.py +++ b/foundry/v2/connectivity/errors/_table_import_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError class TableImportTypeNotSupportedParameters(TypedDict): @@ -33,7 +32,7 @@ class TableImportTypeNotSupportedParameters(TypedDict): @dataclass -class TableImportTypeNotSupported(PalantirRPCException): +class TableImportTypeNotSupported(InternalServerError): name: Literal["TableImportTypeNotSupported"] parameters: TableImportTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/errors/_update_secrets_for_connection_permission_denied.py b/foundry/v2/connectivity/errors/_update_secrets_for_connection_permission_denied.py index b32f817f3..10bb36553 100644 --- a/foundry/v2/connectivity/errors/_update_secrets_for_connection_permission_denied.py +++ b/foundry/v2/connectivity/errors/_update_secrets_for_connection_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.connectivity.models._connection_rid import ConnectionRid @@ -34,7 +33,7 @@ class UpdateSecretsForConnectionPermissionDeniedParameters(TypedDict): @dataclass -class UpdateSecretsForConnectionPermissionDenied(PalantirRPCException): +class UpdateSecretsForConnectionPermissionDenied(PermissionDeniedError): name: Literal["UpdateSecretsForConnectionPermissionDenied"] parameters: UpdateSecretsForConnectionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/connectivity/file_import.py b/foundry/v2/connectivity/file_import.py index e1cab921d..e89c47a6f 100644 --- a/foundry/v2/connectivity/file_import.py +++ b/foundry/v2/connectivity/file_import.py @@ -35,6 +35,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.connectivity import errors as connectivity_errors from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._file_import import FileImport from foundry.v2.connectivity.models._file_import_display_name import FileImportDisplayName # NOQA @@ -112,6 +113,16 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: FileImport + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateFileImportPermissionDenied: Could not create the FileImport. + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present """ return self._api_client.call_api( @@ -149,6 +160,17 @@ def create( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + }, ), ).decode() @@ -178,6 +200,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. """ return self._api_client.call_api( @@ -196,6 +220,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, + }, ), ).decode() @@ -224,6 +251,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BuildRid + + :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. """ return self._api_client.call_api( @@ -244,6 +273,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, + }, ), ).decode() @@ -270,6 +302,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: FileImport + + :raises FileImportNotFound: The given FileImport could not be found. """ return self._api_client.call_api( @@ -290,6 +324,9 @@ def get( body_type=None, response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, ), ).decode() @@ -342,6 +379,7 @@ def list( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -400,6 +438,7 @@ def page( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -444,6 +483,14 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: FileImport + + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. """ return self._api_client.call_api( @@ -482,6 +529,15 @@ def replace( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, + }, ), ).decode() @@ -541,6 +597,16 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[FileImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateFileImportPermissionDenied: Could not create the FileImport. + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present """ return self._api_client.call_api( @@ -578,6 +644,17 @@ def create( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + }, ), ) @@ -607,6 +684,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. """ return self._api_client.call_api( @@ -625,6 +704,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, + }, ), ) @@ -653,6 +735,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[BuildRid] + + :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. """ return self._api_client.call_api( @@ -673,6 +757,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, + }, ), ) @@ -699,6 +786,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[FileImport] + + :raises FileImportNotFound: The given FileImport could not be found. """ return self._api_client.call_api( @@ -719,6 +808,9 @@ def get( body_type=None, response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, ), ) @@ -771,6 +863,7 @@ def list( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -829,6 +922,7 @@ def page( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -873,6 +967,14 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[FileImport] + + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. """ return self._api_client.call_api( @@ -911,6 +1013,15 @@ def replace( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, + }, ), ) @@ -970,6 +1081,16 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[FileImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateFileImportPermissionDenied: Could not create the FileImport. + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileImportNotSupportedForConnection: The specified connection does not support file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present """ return self._api_client.stream_api( @@ -1007,6 +1128,17 @@ def create( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateFileImportPermissionDenied": connectivity_errors.CreateFileImportPermissionDenied, + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileImportNotSupportedForConnection": connectivity_errors.FileImportNotSupportedForConnection, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + }, ), ) @@ -1036,6 +1168,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteFileImportPermissionDenied: Could not delete the FileImport. """ return self._api_client.stream_api( @@ -1054,6 +1188,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteFileImportPermissionDenied": connectivity_errors.DeleteFileImportPermissionDenied, + }, ), ) @@ -1082,6 +1219,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[BuildRid] + + :raises ExecuteFileImportPermissionDenied: Could not execute the FileImport. """ return self._api_client.stream_api( @@ -1102,6 +1241,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteFileImportPermissionDenied": connectivity_errors.ExecuteFileImportPermissionDenied, + }, ), ) @@ -1128,6 +1270,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[FileImport] + + :raises FileImportNotFound: The given FileImport could not be found. """ return self._api_client.stream_api( @@ -1148,6 +1292,9 @@ def get( body_type=None, response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileImportNotFound": connectivity_errors.FileImportNotFound, + }, ), ) @@ -1200,6 +1347,7 @@ def list( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1258,6 +1406,7 @@ def page( body_type=None, response_type=ListFileImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1302,6 +1451,14 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[FileImport] + + :raises FileAtLeastCountFilterInvalidMinCount: The provided `minFilesCount` property in the FileAtLeastCountFilter must be strictly greater than 0. + :raises FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports: Custom file import filters can be fetched but cannot currently be used when creating or updating file imports. + :raises FileSizeFilterGreaterThanCannotBeNegative: The `gt` property in the FileSizeFilter cannot be a negative number. + :raises FileSizeFilterInvalidGreaterThanAndLessThanRange: The provided `gt` and `lt` properties in the FileSizeFilter are invalid. No files will ever satisfy the provided range. The value specified for `gt` must be strictly less than `lt - 1`. + :raises FileSizeFilterLessThanMustBeOneByteOrLarger: The `lt` property in the FileSizeFilter must be at least 1 byte. + :raises FileSizeFilterMissingGreaterThanAndLessThan: Both the `gt` and `lt` properties are missing from the FileSizeFilter. At least one of these properties must be present + :raises ReplaceFileImportPermissionDenied: Could not replace the FileImport. """ return self._api_client.stream_api( @@ -1340,5 +1497,14 @@ def replace( ), response_type=FileImport, request_timeout=request_timeout, + throwable_errors={ + "FileAtLeastCountFilterInvalidMinCount": connectivity_errors.FileAtLeastCountFilterInvalidMinCount, + "FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports": connectivity_errors.FileImportCustomFilterCannotBeUsedToCreateOrUpdateFileImports, + "FileSizeFilterGreaterThanCannotBeNegative": connectivity_errors.FileSizeFilterGreaterThanCannotBeNegative, + "FileSizeFilterInvalidGreaterThanAndLessThanRange": connectivity_errors.FileSizeFilterInvalidGreaterThanAndLessThanRange, + "FileSizeFilterLessThanMustBeOneByteOrLarger": connectivity_errors.FileSizeFilterLessThanMustBeOneByteOrLarger, + "FileSizeFilterMissingGreaterThanAndLessThan": connectivity_errors.FileSizeFilterMissingGreaterThanAndLessThan, + "ReplaceFileImportPermissionDenied": connectivity_errors.ReplaceFileImportPermissionDenied, + }, ), ) diff --git a/foundry/v2/connectivity/table_import.py b/foundry/v2/connectivity/table_import.py index 744f6f018..db095a668 100644 --- a/foundry/v2/connectivity/table_import.py +++ b/foundry/v2/connectivity/table_import.py @@ -34,6 +34,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.connectivity import errors as connectivity_errors from foundry.v2.connectivity.models._connection_rid import ConnectionRid from foundry.v2.connectivity.models._create_table_import_request_table_import_config import ( CreateTableImportRequestTableImportConfig, @@ -120,6 +121,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: TableImport + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateTableImportPermissionDenied: Could not create the TableImport. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.call_api( @@ -160,6 +166,12 @@ def create( ), response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ).decode() @@ -189,6 +201,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. """ return self._api_client.call_api( @@ -207,6 +221,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, + }, ), ).decode() @@ -235,6 +252,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BuildRid + + :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. """ return self._api_client.call_api( @@ -255,6 +274,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, + }, ), ).decode() @@ -281,6 +303,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: TableImport + + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.call_api( @@ -301,6 +326,10 @@ def get( body_type=None, response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ).decode() @@ -353,6 +382,7 @@ def list( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -411,6 +441,7 @@ def page( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -472,6 +503,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[TableImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateTableImportPermissionDenied: Could not create the TableImport. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.call_api( @@ -512,6 +548,12 @@ def create( ), response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ) @@ -541,6 +583,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. """ return self._api_client.call_api( @@ -559,6 +603,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, + }, ), ) @@ -587,6 +634,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[BuildRid] + + :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. """ return self._api_client.call_api( @@ -607,6 +656,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, + }, ), ) @@ -633,6 +685,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[TableImport] + + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.call_api( @@ -653,6 +708,10 @@ def get( body_type=None, response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ) @@ -705,6 +764,7 @@ def list( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -763,6 +823,7 @@ def page( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -824,6 +885,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[TableImport] + + :raises ConnectionDetailsNotDetermined: Details of the connection (such as which types of import it supports) could not be determined. + :raises CreateTableImportPermissionDenied: Could not create the TableImport. + :raises TableImportNotSupportedForConnection: The specified connection does not support creating a table import with the specified config. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.stream_api( @@ -864,6 +930,12 @@ def create( ), response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "ConnectionDetailsNotDetermined": connectivity_errors.ConnectionDetailsNotDetermined, + "CreateTableImportPermissionDenied": connectivity_errors.CreateTableImportPermissionDenied, + "TableImportNotSupportedForConnection": connectivity_errors.TableImportNotSupportedForConnection, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ) @@ -893,6 +965,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteTableImportPermissionDenied: Could not delete the TableImport. """ return self._api_client.stream_api( @@ -911,6 +985,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteTableImportPermissionDenied": connectivity_errors.DeleteTableImportPermissionDenied, + }, ), ) @@ -939,6 +1016,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[BuildRid] + + :raises ExecuteTableImportPermissionDenied: Could not execute the TableImport. """ return self._api_client.stream_api( @@ -959,6 +1038,9 @@ def execute( body_type=None, response_type=BuildRid, request_timeout=request_timeout, + throwable_errors={ + "ExecuteTableImportPermissionDenied": connectivity_errors.ExecuteTableImportPermissionDenied, + }, ), ) @@ -985,6 +1067,9 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[TableImport] + + :raises TableImportNotFound: The given TableImport could not be found. + :raises TableImportTypeNotSupported: The specified table import type is not yet supported in the Platform API. """ return self._api_client.stream_api( @@ -1005,6 +1090,10 @@ def get( body_type=None, response_type=TableImport, request_timeout=request_timeout, + throwable_errors={ + "TableImportNotFound": connectivity_errors.TableImportNotFound, + "TableImportTypeNotSupported": connectivity_errors.TableImportTypeNotSupported, + }, ), ) @@ -1057,6 +1146,7 @@ def list( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1115,5 +1205,6 @@ def page( body_type=None, response_type=ListTableImportsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/core/errors/_api_feature_preview_usage_only.py b/foundry/v2/core/errors/_api_feature_preview_usage_only.py index 7637615de..203b63145 100644 --- a/foundry/v2/core/errors/_api_feature_preview_usage_only.py +++ b/foundry/v2/core/errors/_api_feature_preview_usage_only.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ApiFeaturePreviewUsageOnlyParameters(TypedDict): @@ -34,7 +33,7 @@ class ApiFeaturePreviewUsageOnlyParameters(TypedDict): @dataclass -class ApiFeaturePreviewUsageOnly(PalantirRPCException): +class ApiFeaturePreviewUsageOnly(BadRequestError): name: Literal["ApiFeaturePreviewUsageOnly"] parameters: ApiFeaturePreviewUsageOnlyParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_api_usage_denied.py b/foundry/v2/core/errors/_api_usage_denied.py index 8af46ffd3..1b18eec13 100644 --- a/foundry/v2/core/errors/_api_usage_denied.py +++ b/foundry/v2/core/errors/_api_usage_denied.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._operation_scope import OperationScope @@ -35,7 +34,7 @@ class ApiUsageDeniedParameters(TypedDict): @dataclass -class ApiUsageDenied(PalantirRPCException): +class ApiUsageDenied(PermissionDeniedError): name: Literal["ApiUsageDenied"] parameters: ApiUsageDeniedParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_batch_request_size_exceeded_limit.py b/foundry/v2/core/errors/_batch_request_size_exceeded_limit.py index d7ddb2531..9693b0698 100644 --- a/foundry/v2/core/errors/_batch_request_size_exceeded_limit.py +++ b/foundry/v2/core/errors/_batch_request_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class BatchRequestSizeExceededLimitParameters(TypedDict): @@ -31,13 +30,12 @@ class BatchRequestSizeExceededLimitParameters(TypedDict): MaximumBatchSize: int """The maximum size of batch requests that can be sent to this endpoint.""" - ProvidedBatchSize: int """The size of the batch request that was sent to this endpoint.""" @dataclass -class BatchRequestSizeExceededLimit(PalantirRPCException): +class BatchRequestSizeExceededLimit(BadRequestError): name: Literal["BatchRequestSizeExceededLimit"] parameters: BatchRequestSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_folder_not_found.py b/foundry/v2/core/errors/_folder_not_found.py index 8150da44b..404fb353c 100644 --- a/foundry/v2/core/errors/_folder_not_found.py +++ b/foundry/v2/core/errors/_folder_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._folder_rid import FolderRid @@ -34,7 +33,7 @@ class FolderNotFoundParameters(TypedDict): @dataclass -class FolderNotFound(PalantirRPCException): +class FolderNotFound(NotFoundError): name: Literal["FolderNotFound"] parameters: FolderNotFoundParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_and_filter.py b/foundry/v2/core/errors/_invalid_and_filter.py index 0414f1ef0..28300aaf9 100644 --- a/foundry/v2/core/errors/_invalid_and_filter.py +++ b/foundry/v2/core/errors/_invalid_and_filter.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAndFilterParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAndFilterParameters(TypedDict): @dataclass -class InvalidAndFilter(PalantirRPCException): +class InvalidAndFilter(BadRequestError): name: Literal["InvalidAndFilter"] parameters: InvalidAndFilterParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_change_data_capture_configuration.py b/foundry/v2/core/errors/_invalid_change_data_capture_configuration.py index 38a14c9ee..1d36f037c 100644 --- a/foundry/v2/core/errors/_invalid_change_data_capture_configuration.py +++ b/foundry/v2/core/errors/_invalid_change_data_capture_configuration.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidChangeDataCaptureConfigurationParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidChangeDataCaptureConfigurationParameters(TypedDict): @dataclass -class InvalidChangeDataCaptureConfiguration(PalantirRPCException): +class InvalidChangeDataCaptureConfiguration(BadRequestError): name: Literal["InvalidChangeDataCaptureConfiguration"] parameters: InvalidChangeDataCaptureConfigurationParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_field_schema.py b/foundry/v2/core/errors/_invalid_field_schema.py index 0d3bb2685..e4c8cfb1f 100644 --- a/foundry/v2/core/errors/_invalid_field_schema.py +++ b/foundry/v2/core/errors/_invalid_field_schema.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._field_name import FieldName @@ -37,7 +36,7 @@ class InvalidFieldSchemaParameters(TypedDict): @dataclass -class InvalidFieldSchema(PalantirRPCException): +class InvalidFieldSchema(BadRequestError): name: Literal["InvalidFieldSchema"] parameters: InvalidFieldSchemaParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_filter_value.py b/foundry/v2/core/errors/_invalid_filter_value.py index ac10b2fd0..ec05d54e1 100644 --- a/foundry/v2/core/errors/_invalid_filter_value.py +++ b/foundry/v2/core/errors/_invalid_filter_value.py @@ -19,10 +19,9 @@ from typing import Any from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._filter_type_dict import FilterTypeDict @@ -39,7 +38,7 @@ class InvalidFilterValueParameters(TypedDict): @dataclass -class InvalidFilterValue(PalantirRPCException): +class InvalidFilterValue(BadRequestError): name: Literal["InvalidFilterValue"] parameters: InvalidFilterValueParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_or_filter.py b/foundry/v2/core/errors/_invalid_or_filter.py index 0028c2c8f..4cc5e117c 100644 --- a/foundry/v2/core/errors/_invalid_or_filter.py +++ b/foundry/v2/core/errors/_invalid_or_filter.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidOrFilterParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidOrFilterParameters(TypedDict): @dataclass -class InvalidOrFilter(PalantirRPCException): +class InvalidOrFilter(BadRequestError): name: Literal["InvalidOrFilter"] parameters: InvalidOrFilterParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_page_size.py b/foundry/v2/core/errors/_invalid_page_size.py index e0428d901..5ca6537dd 100644 --- a/foundry/v2/core/errors/_invalid_page_size.py +++ b/foundry/v2/core/errors/_invalid_page_size.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._page_size import PageSize @@ -35,7 +34,7 @@ class InvalidPageSizeParameters(TypedDict): @dataclass -class InvalidPageSize(PalantirRPCException): +class InvalidPageSize(BadRequestError): name: Literal["InvalidPageSize"] parameters: InvalidPageSizeParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_page_token.py b/foundry/v2/core/errors/_invalid_page_token.py index 2a3f5747c..a1c2f8fb8 100644 --- a/foundry/v2/core/errors/_invalid_page_token.py +++ b/foundry/v2/core/errors/_invalid_page_token.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._page_token import PageToken @@ -39,7 +38,7 @@ class InvalidPageTokenParameters(TypedDict): @dataclass -class InvalidPageToken(PalantirRPCException): +class InvalidPageToken(BadRequestError): name: Literal["InvalidPageToken"] parameters: InvalidPageTokenParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_parameter_combination.py b/foundry/v2/core/errors/_invalid_parameter_combination.py index 1d9aa4d0e..65aed8376 100644 --- a/foundry/v2/core/errors/_invalid_parameter_combination.py +++ b/foundry/v2/core/errors/_invalid_parameter_combination.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidParameterCombinationParameters(TypedDict): @@ -36,7 +35,7 @@ class InvalidParameterCombinationParameters(TypedDict): @dataclass -class InvalidParameterCombination(PalantirRPCException): +class InvalidParameterCombination(BadRequestError): name: Literal["InvalidParameterCombination"] parameters: InvalidParameterCombinationParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_schema.py b/foundry/v2/core/errors/_invalid_schema.py index 964a77791..ce9c76126 100644 --- a/foundry/v2/core/errors/_invalid_schema.py +++ b/foundry/v2/core/errors/_invalid_schema.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidSchemaParameters(TypedDict): @@ -35,7 +34,7 @@ class InvalidSchemaParameters(TypedDict): @dataclass -class InvalidSchema(PalantirRPCException): +class InvalidSchema(BadRequestError): name: Literal["InvalidSchema"] parameters: InvalidSchemaParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_invalid_time_zone.py b/foundry/v2/core/errors/_invalid_time_zone.py index c68d57fdc..f937cf70d 100644 --- a/foundry/v2/core/errors/_invalid_time_zone.py +++ b/foundry/v2/core/errors/_invalid_time_zone.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._zone_id import ZoneId @@ -34,7 +33,7 @@ class InvalidTimeZoneParameters(TypedDict): @dataclass -class InvalidTimeZone(PalantirRPCException): +class InvalidTimeZone(BadRequestError): name: Literal["InvalidTimeZone"] parameters: InvalidTimeZoneParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_missing_batch_request.py b/foundry/v2/core/errors/_missing_batch_request.py index c295b983e..66fb1b25f 100644 --- a/foundry/v2/core/errors/_missing_batch_request.py +++ b/foundry/v2/core/errors/_missing_batch_request.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingBatchRequestParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingBatchRequestParameters(TypedDict): @dataclass -class MissingBatchRequest(PalantirRPCException): +class MissingBatchRequest(BadRequestError): name: Literal["MissingBatchRequest"] parameters: MissingBatchRequestParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_missing_post_body.py b/foundry/v2/core/errors/_missing_post_body.py index d5fb3e83f..7fc64437f 100644 --- a/foundry/v2/core/errors/_missing_post_body.py +++ b/foundry/v2/core/errors/_missing_post_body.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingPostBodyParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingPostBodyParameters(TypedDict): @dataclass -class MissingPostBody(PalantirRPCException): +class MissingPostBody(BadRequestError): name: Literal["MissingPostBody"] parameters: MissingPostBodyParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_resource_name_already_exists.py b/foundry/v2/core/errors/_resource_name_already_exists.py index 73f36182d..78304b5b6 100644 --- a/foundry/v2/core/errors/_resource_name_already_exists.py +++ b/foundry/v2/core/errors/_resource_name_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.core.models._folder_rid import FolderRid @@ -36,7 +35,7 @@ class ResourceNameAlreadyExistsParameters(TypedDict): @dataclass -class ResourceNameAlreadyExists(PalantirRPCException): +class ResourceNameAlreadyExists(ConflictError): name: Literal["ResourceNameAlreadyExists"] parameters: ResourceNameAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_schema_is_not_stream_schema.py b/foundry/v2/core/errors/_schema_is_not_stream_schema.py index 0e7042f7a..903d62214 100644 --- a/foundry/v2/core/errors/_schema_is_not_stream_schema.py +++ b/foundry/v2/core/errors/_schema_is_not_stream_schema.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class SchemaIsNotStreamSchemaParameters(TypedDict): @@ -31,7 +30,7 @@ class SchemaIsNotStreamSchemaParameters(TypedDict): @dataclass -class SchemaIsNotStreamSchema(PalantirRPCException): +class SchemaIsNotStreamSchema(BadRequestError): name: Literal["SchemaIsNotStreamSchema"] parameters: SchemaIsNotStreamSchemaParameters error_instance_id: str diff --git a/foundry/v2/core/errors/_unknown_distance_unit.py b/foundry/v2/core/errors/_unknown_distance_unit.py index a32cda38f..2c0aadc2e 100644 --- a/foundry/v2/core/errors/_unknown_distance_unit.py +++ b/foundry/v2/core/errors/_unknown_distance_unit.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._distance_unit import DistanceUnit @@ -37,7 +36,7 @@ class UnknownDistanceUnitParameters(TypedDict): @dataclass -class UnknownDistanceUnit(PalantirRPCException): +class UnknownDistanceUnit(BadRequestError): name: Literal["UnknownDistanceUnit"] parameters: UnknownDistanceUnitParameters error_instance_id: str diff --git a/foundry/v2/datasets/branch.py b/foundry/v2/datasets/branch.py index e488852bc..e6b360008 100644 --- a/foundry/v2/datasets/branch.py +++ b/foundry/v2/datasets/branch.py @@ -35,6 +35,7 @@ from foundry._errors import handle_unexpected from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken +from foundry.v2.datasets import errors as datasets_errors from foundry.v2.datasets.models._branch import Branch from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -87,6 +88,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Branch + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -114,6 +119,11 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ).decode() @@ -138,6 +148,10 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. """ return self._api_client.call_api( @@ -154,6 +168,11 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + }, ), ).decode() @@ -178,6 +197,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Branch + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -196,6 +219,11 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ).decode() @@ -223,6 +251,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ResourceIterator[Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.iterate_api( @@ -243,6 +274,10 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -270,6 +305,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ListBranchesResponse + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -296,6 +334,10 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ).decode() @@ -341,6 +383,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -368,6 +414,11 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -392,6 +443,10 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. """ return self._api_client.call_api( @@ -408,6 +463,11 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + }, ), ) @@ -432,6 +492,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -450,6 +514,11 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -477,6 +546,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListBranchesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -497,6 +569,10 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -524,6 +600,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListBranchesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -550,6 +629,10 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -595,6 +678,10 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateBranchPermissionDenied: The provided token does not have permission to create a branch of this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -622,6 +709,11 @@ def create( ), response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateBranchPermissionDenied": datasets_errors.CreateBranchPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -646,6 +738,10 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DeleteBranchPermissionDenied: The provided token does not have permission to delete the given branch from this dataset. """ return self._api_client.stream_api( @@ -662,6 +758,11 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DeleteBranchPermissionDenied": datasets_errors.DeleteBranchPermissionDenied, + }, ), ) @@ -686,6 +787,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Branch] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -704,6 +809,11 @@ def get( body_type=None, response_type=Branch, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -731,6 +841,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListBranchesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -751,6 +864,10 @@ def list( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -778,6 +895,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListBranchesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -804,5 +924,9 @@ def page( body_type=None, response_type=ListBranchesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) diff --git a/foundry/v2/datasets/dataset.py b/foundry/v2/datasets/dataset.py index e84cdce37..10e4d96fc 100644 --- a/foundry/v2/datasets/dataset.py +++ b/foundry/v2/datasets/dataset.py @@ -38,6 +38,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.datasets import errors as datasets_errors from foundry.v2.datasets.branch import BranchClient from foundry.v2.datasets.file import FileClient from foundry.v2.datasets.models._branch_name import BranchName @@ -47,6 +48,7 @@ from foundry.v2.datasets.models._table_export_format import TableExportFormat from foundry.v2.datasets.models._transaction_rid import TransactionRid from foundry.v2.datasets.transaction import TransactionClient +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -95,6 +97,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Dataset + + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. """ return self._api_client.call_api( @@ -120,6 +124,9 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + }, ), ).decode() @@ -140,6 +147,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Dataset + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -157,6 +168,11 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ).decode() @@ -205,6 +221,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BinaryStream + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ ... @@ -247,6 +271,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: bytes + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ ... @@ -295,6 +327,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ ... @@ -342,6 +382,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ if stream: @@ -375,6 +423,15 @@ def read_table( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableError": datasets_errors.ReadTableError, + "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, + "ReadTableTimeout": datasets_errors.ReadTableTimeout, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, ), ).decode() @@ -417,6 +474,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Dataset] + + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. """ return self._api_client.call_api( @@ -442,6 +501,9 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + }, ), ) @@ -462,6 +524,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Dataset] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -479,6 +545,11 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) @@ -520,6 +591,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[bytes] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ return self._api_client.call_api( @@ -544,6 +623,15 @@ def read_table( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableError": datasets_errors.ReadTableError, + "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, + "ReadTableTimeout": datasets_errors.ReadTableTimeout, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, ), ) @@ -586,6 +674,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Dataset] + + :raises CreateDatasetPermissionDenied: The provided token does not have permission to create a dataset in this folder. """ return self._api_client.stream_api( @@ -611,6 +701,9 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateDatasetPermissionDenied": datasets_errors.CreateDatasetPermissionDenied, + }, ), ) @@ -631,6 +724,10 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Dataset] + + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.stream_api( @@ -648,6 +745,11 @@ def get( body_type=None, response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "DatasetNotFound": datasets_errors.DatasetNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) @@ -689,6 +791,14 @@ def read_table( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[bytes] + + :raises ColumnTypesNotSupported: The dataset contains column types that are not supported. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableDatasetPermissionDenied: The provided token does not have permission to read the given dataset as a table. + :raises ReadTableError: An error occurred while reading the table. Refer to the message for more details. + :raises ReadTableRowLimitExceeded: The request to read the table generates a result that exceeds the allowed number of rows. For datasets not stored as Parquet there is a limit of 1 million rows. For datasets stored as Parquet there is no limit. + :raises ReadTableTimeout: The request to read the table timed out. + :raises SchemaNotFound: A schema could not be found for the given dataset and branch, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -713,5 +823,14 @@ def read_table( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "ColumnTypesNotSupported": datasets_errors.ColumnTypesNotSupported, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableDatasetPermissionDenied": datasets_errors.ReadTableDatasetPermissionDenied, + "ReadTableError": datasets_errors.ReadTableError, + "ReadTableRowLimitExceeded": datasets_errors.ReadTableRowLimitExceeded, + "ReadTableTimeout": datasets_errors.ReadTableTimeout, + "SchemaNotFound": datasets_errors.SchemaNotFound, + }, ), ) diff --git a/foundry/v2/datasets/errors/_abort_transaction_permission_denied.py b/foundry/v2/datasets/errors/_abort_transaction_permission_denied.py index fe5d5a522..08d032818 100644 --- a/foundry/v2/datasets/errors/_abort_transaction_permission_denied.py +++ b/foundry/v2/datasets/errors/_abort_transaction_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class AbortTransactionPermissionDeniedParameters(TypedDict): @dataclass -class AbortTransactionPermissionDenied(PalantirRPCException): +class AbortTransactionPermissionDenied(PermissionDeniedError): name: Literal["AbortTransactionPermissionDenied"] parameters: AbortTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_branch_already_exists.py b/foundry/v2/datasets/errors/_branch_already_exists.py index 9d408052b..6973c61d8 100644 --- a/foundry/v2/datasets/errors/_branch_already_exists.py +++ b/foundry/v2/datasets/errors/_branch_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class BranchAlreadyExistsParameters(TypedDict): @dataclass -class BranchAlreadyExists(PalantirRPCException): +class BranchAlreadyExists(ConflictError): name: Literal["BranchAlreadyExists"] parameters: BranchAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_branch_not_found.py b/foundry/v2/datasets/errors/_branch_not_found.py index 34ac21c74..290a4c286 100644 --- a/foundry/v2/datasets/errors/_branch_not_found.py +++ b/foundry/v2/datasets/errors/_branch_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class BranchNotFoundParameters(TypedDict): @dataclass -class BranchNotFound(PalantirRPCException): +class BranchNotFound(NotFoundError): name: Literal["BranchNotFound"] parameters: BranchNotFoundParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_column_types_not_supported.py b/foundry/v2/datasets/errors/_column_types_not_supported.py index a179a8a54..a2e14828e 100644 --- a/foundry/v2/datasets/errors/_column_types_not_supported.py +++ b/foundry/v2/datasets/errors/_column_types_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class ColumnTypesNotSupportedParameters(TypedDict): @dataclass -class ColumnTypesNotSupported(PalantirRPCException): +class ColumnTypesNotSupported(BadRequestError): name: Literal["ColumnTypesNotSupported"] parameters: ColumnTypesNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_commit_transaction_permission_denied.py b/foundry/v2/datasets/errors/_commit_transaction_permission_denied.py index 1594ad79c..cbf191666 100644 --- a/foundry/v2/datasets/errors/_commit_transaction_permission_denied.py +++ b/foundry/v2/datasets/errors/_commit_transaction_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class CommitTransactionPermissionDeniedParameters(TypedDict): @dataclass -class CommitTransactionPermissionDenied(PalantirRPCException): +class CommitTransactionPermissionDenied(PermissionDeniedError): name: Literal["CommitTransactionPermissionDenied"] parameters: CommitTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_create_branch_permission_denied.py b/foundry/v2/datasets/errors/_create_branch_permission_denied.py index b66e8dee5..7868f5e4a 100644 --- a/foundry/v2/datasets/errors/_create_branch_permission_denied.py +++ b/foundry/v2/datasets/errors/_create_branch_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class CreateBranchPermissionDeniedParameters(TypedDict): @dataclass -class CreateBranchPermissionDenied(PalantirRPCException): +class CreateBranchPermissionDenied(PermissionDeniedError): name: Literal["CreateBranchPermissionDenied"] parameters: CreateBranchPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_create_dataset_permission_denied.py b/foundry/v2/datasets/errors/_create_dataset_permission_denied.py index f94295dfb..fc61b0825 100644 --- a/foundry/v2/datasets/errors/_create_dataset_permission_denied.py +++ b/foundry/v2/datasets/errors/_create_dataset_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._dataset_name import DatasetName from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -37,7 +36,7 @@ class CreateDatasetPermissionDeniedParameters(TypedDict): @dataclass -class CreateDatasetPermissionDenied(PalantirRPCException): +class CreateDatasetPermissionDenied(PermissionDeniedError): name: Literal["CreateDatasetPermissionDenied"] parameters: CreateDatasetPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_create_transaction_permission_denied.py b/foundry/v2/datasets/errors/_create_transaction_permission_denied.py index 8bdf94743..727a8ca13 100644 --- a/foundry/v2/datasets/errors/_create_transaction_permission_denied.py +++ b/foundry/v2/datasets/errors/_create_transaction_permission_denied.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -38,7 +37,7 @@ class CreateTransactionPermissionDeniedParameters(TypedDict): @dataclass -class CreateTransactionPermissionDenied(PalantirRPCException): +class CreateTransactionPermissionDenied(PermissionDeniedError): name: Literal["CreateTransactionPermissionDenied"] parameters: CreateTransactionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_dataset_not_found.py b/foundry/v2/datasets/errors/_dataset_not_found.py index 08992e93e..ac781d400 100644 --- a/foundry/v2/datasets/errors/_dataset_not_found.py +++ b/foundry/v2/datasets/errors/_dataset_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class DatasetNotFoundParameters(TypedDict): @dataclass -class DatasetNotFound(PalantirRPCException): +class DatasetNotFound(NotFoundError): name: Literal["DatasetNotFound"] parameters: DatasetNotFoundParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_dataset_read_not_supported.py b/foundry/v2/datasets/errors/_dataset_read_not_supported.py index 0af09644c..dcffeab09 100644 --- a/foundry/v2/datasets/errors/_dataset_read_not_supported.py +++ b/foundry/v2/datasets/errors/_dataset_read_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class DatasetReadNotSupportedParameters(TypedDict): @dataclass -class DatasetReadNotSupported(PalantirRPCException): +class DatasetReadNotSupported(BadRequestError): name: Literal["DatasetReadNotSupported"] parameters: DatasetReadNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_delete_branch_permission_denied.py b/foundry/v2/datasets/errors/_delete_branch_permission_denied.py index 9281e826c..f38db8041 100644 --- a/foundry/v2/datasets/errors/_delete_branch_permission_denied.py +++ b/foundry/v2/datasets/errors/_delete_branch_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class DeleteBranchPermissionDeniedParameters(TypedDict): @dataclass -class DeleteBranchPermissionDenied(PalantirRPCException): +class DeleteBranchPermissionDenied(PermissionDeniedError): name: Literal["DeleteBranchPermissionDenied"] parameters: DeleteBranchPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_delete_file_permission_denied.py b/foundry/v2/datasets/errors/_delete_file_permission_denied.py index bebc4acdd..2a7340ecd 100644 --- a/foundry/v2/datasets/errors/_delete_file_permission_denied.py +++ b/foundry/v2/datasets/errors/_delete_file_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class DeleteFilePermissionDeniedParameters(TypedDict): @dataclass -class DeleteFilePermissionDenied(PalantirRPCException): +class DeleteFilePermissionDenied(PermissionDeniedError): name: Literal["DeleteFilePermissionDenied"] parameters: DeleteFilePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_delete_schema_permission_denied.py b/foundry/v2/datasets/errors/_delete_schema_permission_denied.py index 86cc62888..b9859084a 100644 --- a/foundry/v2/datasets/errors/_delete_schema_permission_denied.py +++ b/foundry/v2/datasets/errors/_delete_schema_permission_denied.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -41,7 +40,7 @@ class DeleteSchemaPermissionDeniedParameters(TypedDict): @dataclass -class DeleteSchemaPermissionDenied(PalantirRPCException): +class DeleteSchemaPermissionDenied(PermissionDeniedError): name: Literal["DeleteSchemaPermissionDenied"] parameters: DeleteSchemaPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_file_already_exists.py b/foundry/v2/datasets/errors/_file_already_exists.py index ca190cadc..67533e372 100644 --- a/foundry/v2/datasets/errors/_file_already_exists.py +++ b/foundry/v2/datasets/errors/_file_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -40,7 +39,7 @@ class FileAlreadyExistsParameters(TypedDict): @dataclass -class FileAlreadyExists(PalantirRPCException): +class FileAlreadyExists(NotFoundError): name: Literal["FileAlreadyExists"] parameters: FileAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_file_not_found.py b/foundry/v2/datasets/errors/_file_not_found.py index 90095a764..71901a761 100644 --- a/foundry/v2/datasets/errors/_file_not_found.py +++ b/foundry/v2/datasets/errors/_file_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class FileNotFoundParameters(TypedDict): @dataclass -class FileNotFound(PalantirRPCException): +class FileNotFound(NotFoundError): name: Literal["FileNotFound"] parameters: FileNotFoundParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_file_not_found_on_branch.py b/foundry/v2/datasets/errors/_file_not_found_on_branch.py index 251e40eef..29faa1c8c 100644 --- a/foundry/v2/datasets/errors/_file_not_found_on_branch.py +++ b/foundry/v2/datasets/errors/_file_not_found_on_branch.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -40,7 +39,7 @@ class FileNotFoundOnBranchParameters(TypedDict): @dataclass -class FileNotFoundOnBranch(PalantirRPCException): +class FileNotFoundOnBranch(NotFoundError): name: Literal["FileNotFoundOnBranch"] parameters: FileNotFoundOnBranchParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_file_not_found_on_transaction_range.py b/foundry/v2/datasets/errors/_file_not_found_on_transaction_range.py index a10db2e26..88ea47633 100644 --- a/foundry/v2/datasets/errors/_file_not_found_on_transaction_range.py +++ b/foundry/v2/datasets/errors/_file_not_found_on_transaction_range.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -43,7 +42,7 @@ class FileNotFoundOnTransactionRangeParameters(TypedDict): @dataclass -class FileNotFoundOnTransactionRange(PalantirRPCException): +class FileNotFoundOnTransactionRange(NotFoundError): name: Literal["FileNotFoundOnTransactionRange"] parameters: FileNotFoundOnTransactionRangeParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_get_file_content_permission_denied.py b/foundry/v2/datasets/errors/_get_file_content_permission_denied.py index 483cb48cb..227dba0af 100644 --- a/foundry/v2/datasets/errors/_get_file_content_permission_denied.py +++ b/foundry/v2/datasets/errors/_get_file_content_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class GetFileContentPermissionDeniedParameters(TypedDict): @dataclass -class GetFileContentPermissionDenied(PalantirRPCException): +class GetFileContentPermissionDenied(PermissionDeniedError): name: Literal["GetFileContentPermissionDenied"] parameters: GetFileContentPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_invalid_branch_name.py b/foundry/v2/datasets/errors/_invalid_branch_name.py index 027df05c4..e09c3701d 100644 --- a/foundry/v2/datasets/errors/_invalid_branch_name.py +++ b/foundry/v2/datasets/errors/_invalid_branch_name.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._branch_name import BranchName @@ -34,7 +33,7 @@ class InvalidBranchNameParameters(TypedDict): @dataclass -class InvalidBranchName(PalantirRPCException): +class InvalidBranchName(BadRequestError): name: Literal["InvalidBranchName"] parameters: InvalidBranchNameParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_invalid_transaction_type.py b/foundry/v2/datasets/errors/_invalid_transaction_type.py index db11fff91..821e941ec 100644 --- a/foundry/v2/datasets/errors/_invalid_transaction_type.py +++ b/foundry/v2/datasets/errors/_invalid_transaction_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid from foundry.v2.datasets.models._transaction_type import TransactionType @@ -40,7 +39,7 @@ class InvalidTransactionTypeParameters(TypedDict): @dataclass -class InvalidTransactionType(PalantirRPCException): +class InvalidTransactionType(BadRequestError): name: Literal["InvalidTransactionType"] parameters: InvalidTransactionTypeParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_open_transaction_already_exists.py b/foundry/v2/datasets/errors/_open_transaction_already_exists.py index 7ef87e7ab..b2696e702 100644 --- a/foundry/v2/datasets/errors/_open_transaction_already_exists.py +++ b/foundry/v2/datasets/errors/_open_transaction_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class OpenTransactionAlreadyExistsParameters(TypedDict): @dataclass -class OpenTransactionAlreadyExists(PalantirRPCException): +class OpenTransactionAlreadyExists(ConflictError): name: Literal["OpenTransactionAlreadyExists"] parameters: OpenTransactionAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_put_schema_permission_denied.py b/foundry/v2/datasets/errors/_put_schema_permission_denied.py index 90ea2a6bf..9c6742de3 100644 --- a/foundry/v2/datasets/errors/_put_schema_permission_denied.py +++ b/foundry/v2/datasets/errors/_put_schema_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class PutSchemaPermissionDeniedParameters(TypedDict): @dataclass -class PutSchemaPermissionDenied(PalantirRPCException): +class PutSchemaPermissionDenied(PermissionDeniedError): name: Literal["PutSchemaPermissionDenied"] parameters: PutSchemaPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_read_table_dataset_permission_denied.py b/foundry/v2/datasets/errors/_read_table_dataset_permission_denied.py index a328ddd7d..b29b01940 100644 --- a/foundry/v2/datasets/errors/_read_table_dataset_permission_denied.py +++ b/foundry/v2/datasets/errors/_read_table_dataset_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class ReadTableDatasetPermissionDeniedParameters(TypedDict): @dataclass -class ReadTableDatasetPermissionDenied(PalantirRPCException): +class ReadTableDatasetPermissionDenied(PermissionDeniedError): name: Literal["ReadTableDatasetPermissionDenied"] parameters: ReadTableDatasetPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_read_table_error.py b/foundry/v2/datasets/errors/_read_table_error.py index a7bdfb2ee..2756be851 100644 --- a/foundry/v2/datasets/errors/_read_table_error.py +++ b/foundry/v2/datasets/errors/_read_table_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -36,7 +35,7 @@ class ReadTableErrorParameters(TypedDict): @dataclass -class ReadTableError(PalantirRPCException): +class ReadTableError(InternalServerError): name: Literal["ReadTableError"] parameters: ReadTableErrorParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_read_table_row_limit_exceeded.py b/foundry/v2/datasets/errors/_read_table_row_limit_exceeded.py index 713c032c5..3ac40d563 100644 --- a/foundry/v2/datasets/errors/_read_table_row_limit_exceeded.py +++ b/foundry/v2/datasets/errors/_read_table_row_limit_exceeded.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class ReadTableRowLimitExceededParameters(TypedDict): @dataclass -class ReadTableRowLimitExceeded(PalantirRPCException): +class ReadTableRowLimitExceeded(BadRequestError): name: Literal["ReadTableRowLimitExceeded"] parameters: ReadTableRowLimitExceededParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_read_table_timeout.py b/foundry/v2/datasets/errors/_read_table_timeout.py index b778d530a..04e414e16 100644 --- a/foundry/v2/datasets/errors/_read_table_timeout.py +++ b/foundry/v2/datasets/errors/_read_table_timeout.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class ReadTableTimeoutParameters(TypedDict): @dataclass -class ReadTableTimeout(PalantirRPCException): +class ReadTableTimeout(InternalServerError): name: Literal["ReadTableTimeout"] parameters: ReadTableTimeoutParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_schema_not_found.py b/foundry/v2/datasets/errors/_schema_not_found.py index a2b93d901..0566ed806 100644 --- a/foundry/v2/datasets/errors/_schema_not_found.py +++ b/foundry/v2/datasets/errors/_schema_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -41,7 +40,7 @@ class SchemaNotFoundParameters(TypedDict): @dataclass -class SchemaNotFound(PalantirRPCException): +class SchemaNotFound(NotFoundError): name: Literal["SchemaNotFound"] parameters: SchemaNotFoundParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_transaction_not_committed.py b/foundry/v2/datasets/errors/_transaction_not_committed.py index 86b0d720b..37d5fe19d 100644 --- a/foundry/v2/datasets/errors/_transaction_not_committed.py +++ b/foundry/v2/datasets/errors/_transaction_not_committed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid from foundry.v2.datasets.models._transaction_status import TransactionStatus @@ -40,7 +39,7 @@ class TransactionNotCommittedParameters(TypedDict): @dataclass -class TransactionNotCommitted(PalantirRPCException): +class TransactionNotCommitted(BadRequestError): name: Literal["TransactionNotCommitted"] parameters: TransactionNotCommittedParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_transaction_not_found.py b/foundry/v2/datasets/errors/_transaction_not_found.py index 1c56f74c7..4933950d8 100644 --- a/foundry/v2/datasets/errors/_transaction_not_found.py +++ b/foundry/v2/datasets/errors/_transaction_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -37,7 +36,7 @@ class TransactionNotFoundParameters(TypedDict): @dataclass -class TransactionNotFound(PalantirRPCException): +class TransactionNotFound(NotFoundError): name: Literal["TransactionNotFound"] parameters: TransactionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_transaction_not_open.py b/foundry/v2/datasets/errors/_transaction_not_open.py index 24dd22946..8bc6d7abd 100644 --- a/foundry/v2/datasets/errors/_transaction_not_open.py +++ b/foundry/v2/datasets/errors/_transaction_not_open.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid from foundry.v2.datasets.models._transaction_status import TransactionStatus @@ -40,7 +39,7 @@ class TransactionNotOpenParameters(TypedDict): @dataclass -class TransactionNotOpen(PalantirRPCException): +class TransactionNotOpen(BadRequestError): name: Literal["TransactionNotOpen"] parameters: TransactionNotOpenParameters error_instance_id: str diff --git a/foundry/v2/datasets/errors/_upload_file_permission_denied.py b/foundry/v2/datasets/errors/_upload_file_permission_denied.py index dd77ad590..9db85ee51 100644 --- a/foundry/v2/datasets/errors/_upload_file_permission_denied.py +++ b/foundry/v2/datasets/errors/_upload_file_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._file_path import FilePath from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction_rid import TransactionRid @@ -40,7 +39,7 @@ class UploadFilePermissionDeniedParameters(TypedDict): @dataclass -class UploadFilePermissionDenied(PalantirRPCException): +class UploadFilePermissionDenied(PermissionDeniedError): name: Literal["UploadFilePermissionDenied"] parameters: UploadFilePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/datasets/file.py b/foundry/v2/datasets/file.py index 07d184dae..24f57e14c 100644 --- a/foundry/v2/datasets/file.py +++ b/foundry/v2/datasets/file.py @@ -40,6 +40,7 @@ from foundry.v2.core.models._file_path import FilePath from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken +from foundry.v2.datasets import errors as datasets_errors from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._file import File @@ -122,6 +123,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: BinaryStream + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ ... @@ -172,6 +178,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: bytes + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ ... @@ -228,6 +239,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ ... @@ -283,6 +299,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Union[bytes, BinaryStream] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ if stream: @@ -314,6 +335,12 @@ def content( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, + }, ), ).decode() @@ -353,6 +380,11 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DeleteFilePermissionDenied: Could not delete the File. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.call_api( @@ -372,6 +404,12 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ).decode() @@ -420,6 +458,11 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: File + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFound: The given File could not be found. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. """ return self._api_client.call_api( @@ -442,6 +485,12 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFound": datasets_errors.FileNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + }, ), ).decode() @@ -495,6 +544,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ResourceIterator[File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.iterate_api( @@ -518,6 +570,10 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -571,6 +627,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ListFilesResponse + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -600,6 +659,10 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ).decode() @@ -648,6 +711,12 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: File + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. """ return self._api_client.call_api( @@ -671,6 +740,13 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, ), ).decode() @@ -738,6 +814,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[bytes] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ return self._api_client.call_api( @@ -760,6 +841,12 @@ def content( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, + }, ), ) @@ -799,6 +886,11 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DeleteFilePermissionDenied: Could not delete the File. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.call_api( @@ -818,6 +910,12 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ) @@ -866,6 +964,11 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFound: The given File could not be found. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. """ return self._api_client.call_api( @@ -888,6 +991,12 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFound": datasets_errors.FileNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + }, ), ) @@ -941,6 +1050,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListFilesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.call_api( @@ -964,6 +1076,10 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -1017,6 +1133,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ListFilesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -1046,6 +1165,10 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -1094,6 +1217,12 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. """ return self._api_client.call_api( @@ -1117,6 +1246,13 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, ), ) @@ -1184,6 +1320,11 @@ def content( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[bytes] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises GetFileContentPermissionDenied: Could not content the File. """ return self._api_client.stream_api( @@ -1206,6 +1347,12 @@ def content( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "GetFileContentPermissionDenied": datasets_errors.GetFileContentPermissionDenied, + }, ), ) @@ -1245,6 +1392,11 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DeleteFilePermissionDenied: Could not delete the File. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.stream_api( @@ -1264,6 +1416,12 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DeleteFilePermissionDenied": datasets_errors.DeleteFilePermissionDenied, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ) @@ -1312,6 +1470,11 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileNotFound: The given File could not be found. + :raises FileNotFoundOnBranch: The requested file could not be found on the given branch, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -1334,6 +1497,12 @@ def get( body_type=None, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileNotFound": datasets_errors.FileNotFound, + "FileNotFoundOnBranch": datasets_errors.FileNotFoundOnBranch, + }, ), ) @@ -1387,6 +1556,9 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListFilesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -1410,6 +1582,10 @@ def list( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -1463,6 +1639,9 @@ def page( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ListFilesResponse] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. """ warnings.warn( @@ -1492,6 +1671,10 @@ def page( body_type=None, response_type=ListFilesResponse, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + }, ), ) @@ -1540,6 +1723,12 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[File] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises FileAlreadyExists: The given file path already exists in the dataset and transaction. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. + :raises UploadFilePermissionDenied: The provided token does not have permission to upload the given file to the given dataset and transaction. """ return self._api_client.stream_api( @@ -1563,5 +1752,12 @@ def upload( body_type=bytes, response_type=File, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "FileAlreadyExists": datasets_errors.FileAlreadyExists, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + "UploadFilePermissionDenied": datasets_errors.UploadFilePermissionDenied, + }, ), ) diff --git a/foundry/v2/datasets/transaction.py b/foundry/v2/datasets/transaction.py index cccb8a154..5d5600260 100644 --- a/foundry/v2/datasets/transaction.py +++ b/foundry/v2/datasets/transaction.py @@ -32,6 +32,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.datasets import errors as datasets_errors from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.datasets.models._transaction import Transaction @@ -83,6 +84,8 @@ def abort( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Transaction + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. """ return self._api_client.call_api( @@ -101,6 +104,9 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + }, ), ).decode() @@ -150,6 +156,7 @@ def build( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -175,6 +182,8 @@ def commit( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Transaction + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. """ return self._api_client.call_api( @@ -193,6 +202,9 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + }, ), ).decode() @@ -220,6 +232,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Transaction + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.call_api( @@ -247,6 +264,12 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ).decode() @@ -271,6 +294,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Transaction + + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. """ return self._api_client.call_api( @@ -289,6 +314,9 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, ), ).decode() @@ -332,6 +360,8 @@ def abort( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Transaction] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. """ return self._api_client.call_api( @@ -350,6 +380,9 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + }, ), ) @@ -399,6 +432,7 @@ def build( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -424,6 +458,8 @@ def commit( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Transaction] + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. """ return self._api_client.call_api( @@ -442,6 +478,9 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + }, ), ) @@ -469,6 +508,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.call_api( @@ -496,6 +540,12 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ) @@ -520,6 +570,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Transaction] + + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. """ return self._api_client.call_api( @@ -538,6 +590,9 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, ), ) @@ -581,6 +636,8 @@ def abort( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Transaction] + + :raises AbortTransactionPermissionDenied: The provided token does not have permission to abort the given transaction on the given dataset. """ return self._api_client.stream_api( @@ -599,6 +656,9 @@ def abort( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "AbortTransactionPermissionDenied": datasets_errors.AbortTransactionPermissionDenied, + }, ), ) @@ -648,6 +708,7 @@ def build( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -673,6 +734,8 @@ def commit( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Transaction] + + :raises CommitTransactionPermissionDenied: The provided token does not have permission to commit the given transaction on the given dataset. """ return self._api_client.stream_api( @@ -691,6 +754,9 @@ def commit( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "CommitTransactionPermissionDenied": datasets_errors.CommitTransactionPermissionDenied, + }, ), ) @@ -718,6 +784,11 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Transaction] + + :raises BranchNotFound: The requested branch could not be found, or the client token does not have access to it. + :raises CreateTransactionPermissionDenied: The provided token does not have permission to create a transaction on this dataset. + :raises DatasetNotFound: The requested dataset could not be found, or the client token does not have access to it. + :raises OpenTransactionAlreadyExists: A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. """ return self._api_client.stream_api( @@ -745,6 +816,12 @@ def create( ), response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "BranchNotFound": datasets_errors.BranchNotFound, + "CreateTransactionPermissionDenied": datasets_errors.CreateTransactionPermissionDenied, + "DatasetNotFound": datasets_errors.DatasetNotFound, + "OpenTransactionAlreadyExists": datasets_errors.OpenTransactionAlreadyExists, + }, ), ) @@ -769,6 +846,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Transaction] + + :raises TransactionNotFound: The requested transaction could not be found on the dataset, or the client token does not have access to it. """ return self._api_client.stream_api( @@ -787,5 +866,8 @@ def get( body_type=None, response_type=Transaction, request_timeout=request_timeout, + throwable_errors={ + "TransactionNotFound": datasets_errors.TransactionNotFound, + }, ), ) diff --git a/foundry/v2/filesystem/errors/_add_group_to_parent_group_permission_denied.py b/foundry/v2/filesystem/errors/_add_group_to_parent_group_permission_denied.py index 2b4c9eefb..a1b9d4dda 100644 --- a/foundry/v2/filesystem/errors/_add_group_to_parent_group_permission_denied.py +++ b/foundry/v2/filesystem/errors/_add_group_to_parent_group_permission_denied.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._group_rid import GroupRid @@ -35,7 +34,7 @@ class AddGroupToParentGroupPermissionDeniedParameters(TypedDict): @dataclass -class AddGroupToParentGroupPermissionDenied(PalantirRPCException): +class AddGroupToParentGroupPermissionDenied(PermissionDeniedError): name: Literal["AddGroupToParentGroupPermissionDenied"] parameters: AddGroupToParentGroupPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_add_markings_permission_denied.py b/foundry/v2/filesystem/errors/_add_markings_permission_denied.py index b7cc1563b..f6c8450fd 100644 --- a/foundry/v2/filesystem/errors/_add_markings_permission_denied.py +++ b/foundry/v2/filesystem/errors/_add_markings_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class AddMarkingsPermissionDeniedParameters(TypedDict): @dataclass -class AddMarkingsPermissionDenied(PalantirRPCException): +class AddMarkingsPermissionDenied(PermissionDeniedError): name: Literal["AddMarkingsPermissionDenied"] parameters: AddMarkingsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_add_organizations_permission_denied.py b/foundry/v2/filesystem/errors/_add_organizations_permission_denied.py index be03cc5f5..1e6fac1b1 100644 --- a/foundry/v2/filesystem/errors/_add_organizations_permission_denied.py +++ b/foundry/v2/filesystem/errors/_add_organizations_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._project_rid import ProjectRid @@ -34,7 +33,7 @@ class AddOrganizationsPermissionDeniedParameters(TypedDict): @dataclass -class AddOrganizationsPermissionDenied(PalantirRPCException): +class AddOrganizationsPermissionDenied(PermissionDeniedError): name: Literal["AddOrganizationsPermissionDenied"] parameters: AddOrganizationsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_add_resource_roles_permission_denied.py b/foundry/v2/filesystem/errors/_add_resource_roles_permission_denied.py index 33d00d38c..322dcc0da 100644 --- a/foundry/v2/filesystem/errors/_add_resource_roles_permission_denied.py +++ b/foundry/v2/filesystem/errors/_add_resource_roles_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class AddResourceRolesPermissionDeniedParameters(TypedDict): @dataclass -class AddResourceRolesPermissionDenied(PalantirRPCException): +class AddResourceRolesPermissionDenied(PermissionDeniedError): name: Literal["AddResourceRolesPermissionDenied"] parameters: AddResourceRolesPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_folder_outside_project_not_supported.py b/foundry/v2/filesystem/errors/_create_folder_outside_project_not_supported.py index 6de7e655e..a85380097 100644 --- a/foundry/v2/filesystem/errors/_create_folder_outside_project_not_supported.py +++ b/foundry/v2/filesystem/errors/_create_folder_outside_project_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -34,7 +33,7 @@ class CreateFolderOutsideProjectNotSupportedParameters(TypedDict): @dataclass -class CreateFolderOutsideProjectNotSupported(PalantirRPCException): +class CreateFolderOutsideProjectNotSupported(BadRequestError): name: Literal["CreateFolderOutsideProjectNotSupported"] parameters: CreateFolderOutsideProjectNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_folder_permission_denied.py b/foundry/v2/filesystem/errors/_create_folder_permission_denied.py index d81560c6c..3c7db8f1e 100644 --- a/foundry/v2/filesystem/errors/_create_folder_permission_denied.py +++ b/foundry/v2/filesystem/errors/_create_folder_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateFolderPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateFolderPermissionDeniedParameters(TypedDict): @dataclass -class CreateFolderPermissionDenied(PalantirRPCException): +class CreateFolderPermissionDenied(PermissionDeniedError): name: Literal["CreateFolderPermissionDenied"] parameters: CreateFolderPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_group_permission_denied.py b/foundry/v2/filesystem/errors/_create_group_permission_denied.py index 46419732d..d7dd517e8 100644 --- a/foundry/v2/filesystem/errors/_create_group_permission_denied.py +++ b/foundry/v2/filesystem/errors/_create_group_permission_denied.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -35,7 +34,7 @@ class CreateGroupPermissionDeniedParameters(TypedDict): @dataclass -class CreateGroupPermissionDenied(PalantirRPCException): +class CreateGroupPermissionDenied(PermissionDeniedError): name: Literal["CreateGroupPermissionDenied"] parameters: CreateGroupPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_project_from_template_permission_denied.py b/foundry/v2/filesystem/errors/_create_project_from_template_permission_denied.py index ec8092adb..04fe29597 100644 --- a/foundry/v2/filesystem/errors/_create_project_from_template_permission_denied.py +++ b/foundry/v2/filesystem/errors/_create_project_from_template_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateProjectFromTemplatePermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateProjectFromTemplatePermissionDeniedParameters(TypedDict): @dataclass -class CreateProjectFromTemplatePermissionDenied(PalantirRPCException): +class CreateProjectFromTemplatePermissionDenied(PermissionDeniedError): name: Literal["CreateProjectFromTemplatePermissionDenied"] parameters: CreateProjectFromTemplatePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_project_no_owner_like_role_grant.py b/foundry/v2/filesystem/errors/_create_project_no_owner_like_role_grant.py index 5b7e80caa..d530c5de9 100644 --- a/foundry/v2/filesystem/errors/_create_project_no_owner_like_role_grant.py +++ b/foundry/v2/filesystem/errors/_create_project_no_owner_like_role_grant.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._role_id import RoleId @@ -37,7 +36,7 @@ class CreateProjectNoOwnerLikeRoleGrantParameters(TypedDict): @dataclass -class CreateProjectNoOwnerLikeRoleGrant(PalantirRPCException): +class CreateProjectNoOwnerLikeRoleGrant(BadRequestError): name: Literal["CreateProjectNoOwnerLikeRoleGrant"] parameters: CreateProjectNoOwnerLikeRoleGrantParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_create_project_permission_denied.py b/foundry/v2/filesystem/errors/_create_project_permission_denied.py index 95801aea9..ad73a8f40 100644 --- a/foundry/v2/filesystem/errors/_create_project_permission_denied.py +++ b/foundry/v2/filesystem/errors/_create_project_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateProjectPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateProjectPermissionDeniedParameters(TypedDict): @dataclass -class CreateProjectPermissionDenied(PalantirRPCException): +class CreateProjectPermissionDenied(PermissionDeniedError): name: Literal["CreateProjectPermissionDenied"] parameters: CreateProjectPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_default_roles_not_in_space_role_set.py b/foundry/v2/filesystem/errors/_default_roles_not_in_space_role_set.py index d3901f7b0..4a45feb49 100644 --- a/foundry/v2/filesystem/errors/_default_roles_not_in_space_role_set.py +++ b/foundry/v2/filesystem/errors/_default_roles_not_in_space_role_set.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class DefaultRolesNotInSpaceRoleSetParameters(TypedDict): @@ -31,7 +30,7 @@ class DefaultRolesNotInSpaceRoleSetParameters(TypedDict): @dataclass -class DefaultRolesNotInSpaceRoleSet(PalantirRPCException): +class DefaultRolesNotInSpaceRoleSet(BadRequestError): name: Literal["DefaultRolesNotInSpaceRoleSet"] parameters: DefaultRolesNotInSpaceRoleSetParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_delete_resource_permission_denied.py b/foundry/v2/filesystem/errors/_delete_resource_permission_denied.py index 96524eaf6..802292630 100644 --- a/foundry/v2/filesystem/errors/_delete_resource_permission_denied.py +++ b/foundry/v2/filesystem/errors/_delete_resource_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class DeleteResourcePermissionDeniedParameters(TypedDict): @dataclass -class DeleteResourcePermissionDenied(PalantirRPCException): +class DeleteResourcePermissionDenied(PermissionDeniedError): name: Literal["DeleteResourcePermissionDenied"] parameters: DeleteResourcePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_folder_not_found.py b/foundry/v2/filesystem/errors/_folder_not_found.py index 56c6847eb..e7ceaba9c 100644 --- a/foundry/v2/filesystem/errors/_folder_not_found.py +++ b/foundry/v2/filesystem/errors/_folder_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -34,7 +33,7 @@ class FolderNotFoundParameters(TypedDict): @dataclass -class FolderNotFound(PalantirRPCException): +class FolderNotFound(NotFoundError): name: Literal["FolderNotFound"] parameters: FolderNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_forbidden_operation_on_autosaved_resource.py b/foundry/v2/filesystem/errors/_forbidden_operation_on_autosaved_resource.py index 5fb807209..757e3a09a 100644 --- a/foundry/v2/filesystem/errors/_forbidden_operation_on_autosaved_resource.py +++ b/foundry/v2/filesystem/errors/_forbidden_operation_on_autosaved_resource.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class ForbiddenOperationOnAutosavedResourceParameters(TypedDict): @dataclass -class ForbiddenOperationOnAutosavedResource(PalantirRPCException): +class ForbiddenOperationOnAutosavedResource(BadRequestError): name: Literal["ForbiddenOperationOnAutosavedResource"] parameters: ForbiddenOperationOnAutosavedResourceParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_forbidden_operation_on_hidden_resource.py b/foundry/v2/filesystem/errors/_forbidden_operation_on_hidden_resource.py index 823df2512..4d311ff14 100644 --- a/foundry/v2/filesystem/errors/_forbidden_operation_on_hidden_resource.py +++ b/foundry/v2/filesystem/errors/_forbidden_operation_on_hidden_resource.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class ForbiddenOperationOnHiddenResourceParameters(TypedDict): @dataclass -class ForbiddenOperationOnHiddenResource(PalantirRPCException): +class ForbiddenOperationOnHiddenResource(BadRequestError): name: Literal["ForbiddenOperationOnHiddenResource"] parameters: ForbiddenOperationOnHiddenResourceParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_get_access_requirements_permission_denied.py b/foundry/v2/filesystem/errors/_get_access_requirements_permission_denied.py index e5e2d27b4..0f0df2377 100644 --- a/foundry/v2/filesystem/errors/_get_access_requirements_permission_denied.py +++ b/foundry/v2/filesystem/errors/_get_access_requirements_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class GetAccessRequirementsPermissionDeniedParameters(TypedDict): @dataclass -class GetAccessRequirementsPermissionDenied(PalantirRPCException): +class GetAccessRequirementsPermissionDenied(PermissionDeniedError): name: Literal["GetAccessRequirementsPermissionDenied"] parameters: GetAccessRequirementsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_get_by_path_permission_denied.py b/foundry/v2/filesystem/errors/_get_by_path_permission_denied.py index 8c701757e..f1ded8091 100644 --- a/foundry/v2/filesystem/errors/_get_by_path_permission_denied.py +++ b/foundry/v2/filesystem/errors/_get_by_path_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class GetByPathPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class GetByPathPermissionDeniedParameters(TypedDict): @dataclass -class GetByPathPermissionDenied(PalantirRPCException): +class GetByPathPermissionDenied(PermissionDeniedError): name: Literal["GetByPathPermissionDenied"] parameters: GetByPathPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_get_root_folder_not_supported.py b/foundry/v2/filesystem/errors/_get_root_folder_not_supported.py index 530618100..34291e3be 100644 --- a/foundry/v2/filesystem/errors/_get_root_folder_not_supported.py +++ b/foundry/v2/filesystem/errors/_get_root_folder_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class GetRootFolderNotSupportedParameters(TypedDict): @@ -31,7 +30,7 @@ class GetRootFolderNotSupportedParameters(TypedDict): @dataclass -class GetRootFolderNotSupported(PalantirRPCException): +class GetRootFolderNotSupported(BadRequestError): name: Literal["GetRootFolderNotSupported"] parameters: GetRootFolderNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_get_space_resource_not_supported.py b/foundry/v2/filesystem/errors/_get_space_resource_not_supported.py index be3b130f7..8b8e192f3 100644 --- a/foundry/v2/filesystem/errors/_get_space_resource_not_supported.py +++ b/foundry/v2/filesystem/errors/_get_space_resource_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._space_rid import SpaceRid @@ -34,7 +33,7 @@ class GetSpaceResourceNotSupportedParameters(TypedDict): @dataclass -class GetSpaceResourceNotSupported(PalantirRPCException): +class GetSpaceResourceNotSupported(BadRequestError): name: Literal["GetSpaceResourceNotSupported"] parameters: GetSpaceResourceNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_default_roles.py b/foundry/v2/filesystem/errors/_invalid_default_roles.py index d91b232e0..6b5bf30de 100644 --- a/foundry/v2/filesystem/errors/_invalid_default_roles.py +++ b/foundry/v2/filesystem/errors/_invalid_default_roles.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidDefaultRolesParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidDefaultRolesParameters(TypedDict): @dataclass -class InvalidDefaultRoles(PalantirRPCException): +class InvalidDefaultRoles(BadRequestError): name: Literal["InvalidDefaultRoles"] parameters: InvalidDefaultRolesParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_description.py b/foundry/v2/filesystem/errors/_invalid_description.py index 7321a861b..b9b29eda6 100644 --- a/foundry/v2/filesystem/errors/_invalid_description.py +++ b/foundry/v2/filesystem/errors/_invalid_description.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidDescriptionParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidDescriptionParameters(TypedDict): @dataclass -class InvalidDescription(PalantirRPCException): +class InvalidDescription(BadRequestError): name: Literal["InvalidDescription"] parameters: InvalidDescriptionParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_display_name.py b/foundry/v2/filesystem/errors/_invalid_display_name.py index 712fc0fe7..5d7d4f052 100644 --- a/foundry/v2/filesystem/errors/_invalid_display_name.py +++ b/foundry/v2/filesystem/errors/_invalid_display_name.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_display_name import ResourceDisplayName @@ -37,7 +36,7 @@ class InvalidDisplayNameParameters(TypedDict): @dataclass -class InvalidDisplayName(PalantirRPCException): +class InvalidDisplayName(BadRequestError): name: Literal["InvalidDisplayName"] parameters: InvalidDisplayNameParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_folder.py b/foundry/v2/filesystem/errors/_invalid_folder.py index 8fb2fe2ea..0e2fc54ad 100644 --- a/foundry/v2/filesystem/errors/_invalid_folder.py +++ b/foundry/v2/filesystem/errors/_invalid_folder.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class InvalidFolderParameters(TypedDict): @dataclass -class InvalidFolder(PalantirRPCException): +class InvalidFolder(BadRequestError): name: Literal["InvalidFolder"] parameters: InvalidFolderParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_organization_hierarchy.py b/foundry/v2/filesystem/errors/_invalid_organization_hierarchy.py index 4542e3963..9ffbb28f0 100644 --- a/foundry/v2/filesystem/errors/_invalid_organization_hierarchy.py +++ b/foundry/v2/filesystem/errors/_invalid_organization_hierarchy.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -35,7 +34,7 @@ class InvalidOrganizationHierarchyParameters(TypedDict): @dataclass -class InvalidOrganizationHierarchy(PalantirRPCException): +class InvalidOrganizationHierarchy(BadRequestError): name: Literal["InvalidOrganizationHierarchy"] parameters: InvalidOrganizationHierarchyParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_organizations.py b/foundry/v2/filesystem/errors/_invalid_organizations.py index 19efaf465..bb752c818 100644 --- a/foundry/v2/filesystem/errors/_invalid_organizations.py +++ b/foundry/v2/filesystem/errors/_invalid_organizations.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidOrganizationsParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidOrganizationsParameters(TypedDict): @dataclass -class InvalidOrganizations(PalantirRPCException): +class InvalidOrganizations(BadRequestError): name: Literal["InvalidOrganizations"] parameters: InvalidOrganizationsParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_path.py b/foundry/v2/filesystem/errors/_invalid_path.py index 8404843ec..c10d2d6fd 100644 --- a/foundry/v2/filesystem/errors/_invalid_path.py +++ b/foundry/v2/filesystem/errors/_invalid_path.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_path import ResourcePath @@ -38,7 +37,7 @@ class InvalidPathParameters(TypedDict): @dataclass -class InvalidPath(PalantirRPCException): +class InvalidPath(BadRequestError): name: Literal["InvalidPath"] parameters: InvalidPathParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_principal_ids_for_group_template.py b/foundry/v2/filesystem/errors/_invalid_principal_ids_for_group_template.py index d3a6b4e38..b1e51b38f 100644 --- a/foundry/v2/filesystem/errors/_invalid_principal_ids_for_group_template.py +++ b/foundry/v2/filesystem/errors/_invalid_principal_ids_for_group_template.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._principal_id import PrincipalId @@ -35,7 +34,7 @@ class InvalidPrincipalIdsForGroupTemplateParameters(TypedDict): @dataclass -class InvalidPrincipalIdsForGroupTemplate(PalantirRPCException): +class InvalidPrincipalIdsForGroupTemplate(BadRequestError): name: Literal["InvalidPrincipalIdsForGroupTemplate"] parameters: InvalidPrincipalIdsForGroupTemplateParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_role_ids.py b/foundry/v2/filesystem/errors/_invalid_role_ids.py index ba4a773c6..e73259fcb 100644 --- a/foundry/v2/filesystem/errors/_invalid_role_ids.py +++ b/foundry/v2/filesystem/errors/_invalid_role_ids.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._role_id import RoleId @@ -36,7 +35,7 @@ class InvalidRoleIdsParameters(TypedDict): @dataclass -class InvalidRoleIds(PalantirRPCException): +class InvalidRoleIds(BadRequestError): name: Literal["InvalidRoleIds"] parameters: InvalidRoleIdsParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_variable.py b/foundry/v2/filesystem/errors/_invalid_variable.py index 5b479f512..404a1ffa9 100644 --- a/foundry/v2/filesystem/errors/_invalid_variable.py +++ b/foundry/v2/filesystem/errors/_invalid_variable.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidVariableParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidVariableParameters(TypedDict): @dataclass -class InvalidVariable(PalantirRPCException): +class InvalidVariable(BadRequestError): name: Literal["InvalidVariable"] parameters: InvalidVariableParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_invalid_variable_enum_option.py b/foundry/v2/filesystem/errors/_invalid_variable_enum_option.py index 3c3f1479a..76e30bddb 100644 --- a/foundry/v2/filesystem/errors/_invalid_variable_enum_option.py +++ b/foundry/v2/filesystem/errors/_invalid_variable_enum_option.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidVariableEnumOptionParameters(TypedDict): @@ -38,7 +37,7 @@ class InvalidVariableEnumOptionParameters(TypedDict): @dataclass -class InvalidVariableEnumOption(PalantirRPCException): +class InvalidVariableEnumOption(BadRequestError): name: Literal["InvalidVariableEnumOption"] parameters: InvalidVariableEnumOptionParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_marking_not_found.py b/foundry/v2/filesystem/errors/_marking_not_found.py index 91c8739c7..03baa3fa5 100644 --- a/foundry/v2/filesystem/errors/_marking_not_found.py +++ b/foundry/v2/filesystem/errors/_marking_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._marking_id import MarkingId @@ -35,7 +34,7 @@ class MarkingNotFoundParameters(TypedDict): @dataclass -class MarkingNotFound(PalantirRPCException): +class MarkingNotFound(NotFoundError): name: Literal["MarkingNotFound"] parameters: MarkingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_missing_display_name.py b/foundry/v2/filesystem/errors/_missing_display_name.py index 5f2318a48..af6f6b7cc 100644 --- a/foundry/v2/filesystem/errors/_missing_display_name.py +++ b/foundry/v2/filesystem/errors/_missing_display_name.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingDisplayNameParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingDisplayNameParameters(TypedDict): @dataclass -class MissingDisplayName(PalantirRPCException): +class MissingDisplayName(BadRequestError): name: Literal["MissingDisplayName"] parameters: MissingDisplayNameParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_missing_variable_value.py b/foundry/v2/filesystem/errors/_missing_variable_value.py index 822d9e5dd..96b88ca3d 100644 --- a/foundry/v2/filesystem/errors/_missing_variable_value.py +++ b/foundry/v2/filesystem/errors/_missing_variable_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingVariableValueParameters(TypedDict): @@ -33,7 +32,7 @@ class MissingVariableValueParameters(TypedDict): @dataclass -class MissingVariableValue(PalantirRPCException): +class MissingVariableValue(BadRequestError): name: Literal["MissingVariableValue"] parameters: MissingVariableValueParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_not_authorized_to_apply_organization.py b/foundry/v2/filesystem/errors/_not_authorized_to_apply_organization.py index f90a60cc9..42ce40a25 100644 --- a/foundry/v2/filesystem/errors/_not_authorized_to_apply_organization.py +++ b/foundry/v2/filesystem/errors/_not_authorized_to_apply_organization.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -35,7 +34,7 @@ class NotAuthorizedToApplyOrganizationParameters(TypedDict): @dataclass -class NotAuthorizedToApplyOrganization(PalantirRPCException): +class NotAuthorizedToApplyOrganization(BadRequestError): name: Literal["NotAuthorizedToApplyOrganization"] parameters: NotAuthorizedToApplyOrganizationParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_organization_marking_not_on_space.py b/foundry/v2/filesystem/errors/_organization_marking_not_on_space.py index 60a2d2dfd..3ca5a8820 100644 --- a/foundry/v2/filesystem/errors/_organization_marking_not_on_space.py +++ b/foundry/v2/filesystem/errors/_organization_marking_not_on_space.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._organization_rid import OrganizationRid from foundry.v2.filesystem.models._space_rid import SpaceRid @@ -38,7 +37,7 @@ class OrganizationMarkingNotOnSpaceParameters(TypedDict): @dataclass -class OrganizationMarkingNotOnSpace(PalantirRPCException): +class OrganizationMarkingNotOnSpace(BadRequestError): name: Literal["OrganizationMarkingNotOnSpace"] parameters: OrganizationMarkingNotOnSpaceParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_organization_marking_not_supported.py b/foundry/v2/filesystem/errors/_organization_marking_not_supported.py index db46c15cc..8d54f1d7b 100644 --- a/foundry/v2/filesystem/errors/_organization_marking_not_supported.py +++ b/foundry/v2/filesystem/errors/_organization_marking_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._marking_id import MarkingId @@ -38,7 +37,7 @@ class OrganizationMarkingNotSupportedParameters(TypedDict): @dataclass -class OrganizationMarkingNotSupported(PalantirRPCException): +class OrganizationMarkingNotSupported(BadRequestError): name: Literal["OrganizationMarkingNotSupported"] parameters: OrganizationMarkingNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_organizations_not_found.py b/foundry/v2/filesystem/errors/_organizations_not_found.py index ec3442483..cec793a82 100644 --- a/foundry/v2/filesystem/errors/_organizations_not_found.py +++ b/foundry/v2/filesystem/errors/_organizations_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._organization_rid import OrganizationRid @@ -35,7 +34,7 @@ class OrganizationsNotFoundParameters(TypedDict): @dataclass -class OrganizationsNotFound(PalantirRPCException): +class OrganizationsNotFound(NotFoundError): name: Literal["OrganizationsNotFound"] parameters: OrganizationsNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_path_not_found.py b/foundry/v2/filesystem/errors/_path_not_found.py index 5cb5bbff3..f836d3f83 100644 --- a/foundry/v2/filesystem/errors/_path_not_found.py +++ b/foundry/v2/filesystem/errors/_path_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._resource_path import ResourcePath @@ -34,7 +33,7 @@ class PathNotFoundParameters(TypedDict): @dataclass -class PathNotFound(PalantirRPCException): +class PathNotFound(NotFoundError): name: Literal["PathNotFound"] parameters: PathNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_permanently_delete_resource_permission_denied.py b/foundry/v2/filesystem/errors/_permanently_delete_resource_permission_denied.py index 296e564ec..9dbfbd7d0 100644 --- a/foundry/v2/filesystem/errors/_permanently_delete_resource_permission_denied.py +++ b/foundry/v2/filesystem/errors/_permanently_delete_resource_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class PermanentlyDeleteResourcePermissionDeniedParameters(TypedDict): @dataclass -class PermanentlyDeleteResourcePermissionDenied(PalantirRPCException): +class PermanentlyDeleteResourcePermissionDenied(PermissionDeniedError): name: Literal["PermanentlyDeleteResourcePermissionDenied"] parameters: PermanentlyDeleteResourcePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_project_creation_not_supported.py b/foundry/v2/filesystem/errors/_project_creation_not_supported.py index cbd20b283..ff50d99b2 100644 --- a/foundry/v2/filesystem/errors/_project_creation_not_supported.py +++ b/foundry/v2/filesystem/errors/_project_creation_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._space_rid import SpaceRid @@ -34,7 +33,7 @@ class ProjectCreationNotSupportedParameters(TypedDict): @dataclass -class ProjectCreationNotSupported(PalantirRPCException): +class ProjectCreationNotSupported(BadRequestError): name: Literal["ProjectCreationNotSupported"] parameters: ProjectCreationNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_project_name_already_exists.py b/foundry/v2/filesystem/errors/_project_name_already_exists.py index cb52cf417..8e3fbf141 100644 --- a/foundry/v2/filesystem/errors/_project_name_already_exists.py +++ b/foundry/v2/filesystem/errors/_project_name_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.filesystem.models._resource_display_name import ResourceDisplayName from foundry.v2.filesystem.models._space_rid import SpaceRid @@ -37,7 +36,7 @@ class ProjectNameAlreadyExistsParameters(TypedDict): @dataclass -class ProjectNameAlreadyExists(PalantirRPCException): +class ProjectNameAlreadyExists(ConflictError): name: Literal["ProjectNameAlreadyExists"] parameters: ProjectNameAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_project_not_found.py b/foundry/v2/filesystem/errors/_project_not_found.py index 57930d819..8334532b3 100644 --- a/foundry/v2/filesystem/errors/_project_not_found.py +++ b/foundry/v2/filesystem/errors/_project_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._project_rid import ProjectRid @@ -34,7 +33,7 @@ class ProjectNotFoundParameters(TypedDict): @dataclass -class ProjectNotFound(PalantirRPCException): +class ProjectNotFound(NotFoundError): name: Literal["ProjectNotFound"] parameters: ProjectNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_project_template_not_found.py b/foundry/v2/filesystem/errors/_project_template_not_found.py index cec432ba9..74f626a5e 100644 --- a/foundry/v2/filesystem/errors/_project_template_not_found.py +++ b/foundry/v2/filesystem/errors/_project_template_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._project_template_rid import ProjectTemplateRid @@ -34,7 +33,7 @@ class ProjectTemplateNotFoundParameters(TypedDict): @dataclass -class ProjectTemplateNotFound(PalantirRPCException): +class ProjectTemplateNotFound(NotFoundError): name: Literal["ProjectTemplateNotFound"] parameters: ProjectTemplateNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_remove_markings_permission_denied.py b/foundry/v2/filesystem/errors/_remove_markings_permission_denied.py index 47952bf59..79eb45ea7 100644 --- a/foundry/v2/filesystem/errors/_remove_markings_permission_denied.py +++ b/foundry/v2/filesystem/errors/_remove_markings_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class RemoveMarkingsPermissionDeniedParameters(TypedDict): @dataclass -class RemoveMarkingsPermissionDenied(PalantirRPCException): +class RemoveMarkingsPermissionDenied(PermissionDeniedError): name: Literal["RemoveMarkingsPermissionDenied"] parameters: RemoveMarkingsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_remove_organizations_permission_denied.py b/foundry/v2/filesystem/errors/_remove_organizations_permission_denied.py index faee21076..5fbe9b784 100644 --- a/foundry/v2/filesystem/errors/_remove_organizations_permission_denied.py +++ b/foundry/v2/filesystem/errors/_remove_organizations_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._project_rid import ProjectRid @@ -34,7 +33,7 @@ class RemoveOrganizationsPermissionDeniedParameters(TypedDict): @dataclass -class RemoveOrganizationsPermissionDenied(PalantirRPCException): +class RemoveOrganizationsPermissionDenied(PermissionDeniedError): name: Literal["RemoveOrganizationsPermissionDenied"] parameters: RemoveOrganizationsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_remove_resource_roles_permission_denied.py b/foundry/v2/filesystem/errors/_remove_resource_roles_permission_denied.py index 1341eab4d..04f499934 100644 --- a/foundry/v2/filesystem/errors/_remove_resource_roles_permission_denied.py +++ b/foundry/v2/filesystem/errors/_remove_resource_roles_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class RemoveResourceRolesPermissionDeniedParameters(TypedDict): @dataclass -class RemoveResourceRolesPermissionDenied(PalantirRPCException): +class RemoveResourceRolesPermissionDenied(PermissionDeniedError): name: Literal["RemoveResourceRolesPermissionDenied"] parameters: RemoveResourceRolesPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_resource_name_already_exists.py b/foundry/v2/filesystem/errors/_resource_name_already_exists.py index 5045ef4ae..f9b78de20 100644 --- a/foundry/v2/filesystem/errors/_resource_name_already_exists.py +++ b/foundry/v2/filesystem/errors/_resource_name_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -36,7 +35,7 @@ class ResourceNameAlreadyExistsParameters(TypedDict): @dataclass -class ResourceNameAlreadyExists(PalantirRPCException): +class ResourceNameAlreadyExists(ConflictError): name: Literal["ResourceNameAlreadyExists"] parameters: ResourceNameAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_resource_not_directly_trashed.py b/foundry/v2/filesystem/errors/_resource_not_directly_trashed.py index 94da9df64..28e9dd71a 100644 --- a/foundry/v2/filesystem/errors/_resource_not_directly_trashed.py +++ b/foundry/v2/filesystem/errors/_resource_not_directly_trashed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class ResourceNotDirectlyTrashedParameters(TypedDict): @dataclass -class ResourceNotDirectlyTrashed(PalantirRPCException): +class ResourceNotDirectlyTrashed(BadRequestError): name: Literal["ResourceNotDirectlyTrashed"] parameters: ResourceNotDirectlyTrashedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_resource_not_found.py b/foundry/v2/filesystem/errors/_resource_not_found.py index 277587a34..a90487876 100644 --- a/foundry/v2/filesystem/errors/_resource_not_found.py +++ b/foundry/v2/filesystem/errors/_resource_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class ResourceNotFoundParameters(TypedDict): @dataclass -class ResourceNotFound(PalantirRPCException): +class ResourceNotFound(NotFoundError): name: Literal["ResourceNotFound"] parameters: ResourceNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_resource_not_trashed.py b/foundry/v2/filesystem/errors/_resource_not_trashed.py index 7e85552e5..a23765874 100644 --- a/foundry/v2/filesystem/errors/_resource_not_trashed.py +++ b/foundry/v2/filesystem/errors/_resource_not_trashed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class ResourceNotTrashedParameters(TypedDict): @dataclass -class ResourceNotTrashed(PalantirRPCException): +class ResourceNotTrashed(BadRequestError): name: Literal["ResourceNotTrashed"] parameters: ResourceNotTrashedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_restore_resource_permission_denied.py b/foundry/v2/filesystem/errors/_restore_resource_permission_denied.py index 66cb7dea7..e24703ba7 100644 --- a/foundry/v2/filesystem/errors/_restore_resource_permission_denied.py +++ b/foundry/v2/filesystem/errors/_restore_resource_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class RestoreResourcePermissionDeniedParameters(TypedDict): @dataclass -class RestoreResourcePermissionDenied(PalantirRPCException): +class RestoreResourcePermissionDenied(PermissionDeniedError): name: Literal["RestoreResourcePermissionDenied"] parameters: RestoreResourcePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_space_not_found.py b/foundry/v2/filesystem/errors/_space_not_found.py index 63b9567ad..1ac8ae325 100644 --- a/foundry/v2/filesystem/errors/_space_not_found.py +++ b/foundry/v2/filesystem/errors/_space_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.filesystem.models._space_rid import SpaceRid @@ -34,7 +33,7 @@ class SpaceNotFoundParameters(TypedDict): @dataclass -class SpaceNotFound(PalantirRPCException): +class SpaceNotFound(NotFoundError): name: Literal["SpaceNotFound"] parameters: SpaceNotFoundParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_template_group_name_conflict.py b/foundry/v2/filesystem/errors/_template_group_name_conflict.py index 833919eca..745f92972 100644 --- a/foundry/v2/filesystem/errors/_template_group_name_conflict.py +++ b/foundry/v2/filesystem/errors/_template_group_name_conflict.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.core.models._group_name import GroupName @@ -35,7 +34,7 @@ class TemplateGroupNameConflictParameters(TypedDict): @dataclass -class TemplateGroupNameConflict(PalantirRPCException): +class TemplateGroupNameConflict(ConflictError): name: Literal["TemplateGroupNameConflict"] parameters: TemplateGroupNameConflictParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_template_marking_name_conflict.py b/foundry/v2/filesystem/errors/_template_marking_name_conflict.py index 860a27fc5..4c59149c7 100644 --- a/foundry/v2/filesystem/errors/_template_marking_name_conflict.py +++ b/foundry/v2/filesystem/errors/_template_marking_name_conflict.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class TemplateMarkingNameConflictParameters(TypedDict): @@ -34,7 +33,7 @@ class TemplateMarkingNameConflictParameters(TypedDict): @dataclass -class TemplateMarkingNameConflict(PalantirRPCException): +class TemplateMarkingNameConflict(ConflictError): name: Literal["TemplateMarkingNameConflict"] parameters: TemplateMarkingNameConflictParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_trashing_autosaved_resources_not_supported.py b/foundry/v2/filesystem/errors/_trashing_autosaved_resources_not_supported.py index 1c0ff9a1b..586928479 100644 --- a/foundry/v2/filesystem/errors/_trashing_autosaved_resources_not_supported.py +++ b/foundry/v2/filesystem/errors/_trashing_autosaved_resources_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class TrashingAutosavedResourcesNotSupportedParameters(TypedDict): @dataclass -class TrashingAutosavedResourcesNotSupported(PalantirRPCException): +class TrashingAutosavedResourcesNotSupported(BadRequestError): name: Literal["TrashingAutosavedResourcesNotSupported"] parameters: TrashingAutosavedResourcesNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_trashing_hidden_resources_not_supported.py b/foundry/v2/filesystem/errors/_trashing_hidden_resources_not_supported.py index 3f9621d2f..261939c87 100644 --- a/foundry/v2/filesystem/errors/_trashing_hidden_resources_not_supported.py +++ b/foundry/v2/filesystem/errors/_trashing_hidden_resources_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class TrashingHiddenResourcesNotSupportedParameters(TypedDict): @dataclass -class TrashingHiddenResourcesNotSupported(PalantirRPCException): +class TrashingHiddenResourcesNotSupported(BadRequestError): name: Literal["TrashingHiddenResourcesNotSupported"] parameters: TrashingHiddenResourcesNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/errors/_trashing_space_not_supported.py b/foundry/v2/filesystem/errors/_trashing_space_not_supported.py index 0c33d3b18..5f41426ff 100644 --- a/foundry/v2/filesystem/errors/_trashing_space_not_supported.py +++ b/foundry/v2/filesystem/errors/_trashing_space_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._resource_rid import ResourceRid @@ -34,7 +33,7 @@ class TrashingSpaceNotSupportedParameters(TypedDict): @dataclass -class TrashingSpaceNotSupported(PalantirRPCException): +class TrashingSpaceNotSupported(BadRequestError): name: Literal["TrashingSpaceNotSupported"] parameters: TrashingSpaceNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/filesystem/folder.py b/foundry/v2/filesystem/folder.py index a255ef52c..c089057ac 100644 --- a/foundry/v2/filesystem/folder.py +++ b/foundry/v2/filesystem/folder.py @@ -36,6 +36,7 @@ from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._folder import Folder from foundry.v2.filesystem.models._folder_rid import FolderRid from foundry.v2.filesystem.models._list_children_of_folder_response import ( @@ -117,6 +118,7 @@ def children( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -177,6 +179,7 @@ def children_page( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -203,6 +206,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Folder + + :raises CreateFolderPermissionDenied: Could not create the Folder. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -230,6 +236,10 @@ def create( ), response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ).decode() @@ -253,6 +263,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Folder + + :raises FolderNotFound: The given Folder could not be found. """ return self._api_client.call_api( @@ -272,6 +284,9 @@ def get( body_type=None, response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + }, ), ).decode() @@ -344,6 +359,7 @@ def children( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -404,6 +420,7 @@ def children_page( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -430,6 +447,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Folder] + + :raises CreateFolderPermissionDenied: Could not create the Folder. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -457,6 +477,10 @@ def create( ), response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) @@ -480,6 +504,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Folder] + + :raises FolderNotFound: The given Folder could not be found. """ return self._api_client.call_api( @@ -499,6 +525,9 @@ def get( body_type=None, response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + }, ), ) @@ -571,6 +600,7 @@ def children( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -631,6 +661,7 @@ def children_page( body_type=None, response_type=ListChildrenOfFolderResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -657,6 +688,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Folder] + + :raises CreateFolderPermissionDenied: Could not create the Folder. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.stream_api( @@ -684,6 +718,10 @@ def create( ), response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "CreateFolderPermissionDenied": filesystem_errors.CreateFolderPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) @@ -707,6 +745,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Folder] + + :raises FolderNotFound: The given Folder could not be found. """ return self._api_client.stream_api( @@ -726,5 +766,8 @@ def get( body_type=None, response_type=Folder, request_timeout=request_timeout, + throwable_errors={ + "FolderNotFound": filesystem_errors.FolderNotFound, + }, ), ) diff --git a/foundry/v2/filesystem/project.py b/foundry/v2/filesystem/project.py index 225e0dbb8..250e8748d 100644 --- a/foundry/v2/filesystem/project.py +++ b/foundry/v2/filesystem/project.py @@ -40,6 +40,7 @@ from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode from foundry.v2.core.models._role_id import RoleId +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._list_organizations_of_project_response import ( ListOrganizationsOfProjectResponse, ) # NOQA @@ -102,6 +103,8 @@ def add_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. """ return self._api_client.call_api( @@ -128,6 +131,9 @@ def add_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, + }, ), ).decode() @@ -171,6 +177,15 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Project + + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises CreateProjectPermissionDenied: Could not create the Project. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` or be too long. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises SpaceNotFound: The referenced space cannot be found. """ return self._api_client.call_api( @@ -208,6 +223,16 @@ def create( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, ), ).decode() @@ -243,6 +268,23 @@ def create_from_template( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Project + + :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. + :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. + :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. + :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. + :raises InvalidOrganizationHierarchy: The project created from template would have either no organizations in a marked space, or an organization which is not on the space. + :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. + :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. + :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. + :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. + :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. + :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. + :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. + :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. + :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. """ return self._api_client.call_api( @@ -278,6 +320,24 @@ def create_from_template( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, + "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, + "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, + "InvalidDescription": filesystem_errors.InvalidDescription, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "InvalidOrganizations": filesystem_errors.InvalidOrganizations, + "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, + "InvalidVariable": filesystem_errors.InvalidVariable, + "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, + "MissingVariableValue": filesystem_errors.MissingVariableValue, + "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, + "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, + "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, + "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, + }, ), ).decode() @@ -301,6 +361,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Project + + :raises ProjectNotFound: The given Project could not be found. """ return self._api_client.call_api( @@ -320,6 +382,9 @@ def get( body_type=None, response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, ), ).decode() @@ -372,6 +437,7 @@ def organizations( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -430,6 +496,7 @@ def organizations_page( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -456,6 +523,8 @@ def remove_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. """ return self._api_client.call_api( @@ -482,6 +551,9 @@ def remove_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, + }, ), ).decode() @@ -526,6 +598,8 @@ def add_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. """ return self._api_client.call_api( @@ -552,6 +626,9 @@ def add_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, + }, ), ) @@ -595,6 +672,15 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Project] + + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises CreateProjectPermissionDenied: Could not create the Project. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` or be too long. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises SpaceNotFound: The referenced space cannot be found. """ return self._api_client.call_api( @@ -632,6 +718,16 @@ def create( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, ), ) @@ -667,6 +763,23 @@ def create_from_template( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Project] + + :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. + :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. + :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. + :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. + :raises InvalidOrganizationHierarchy: The project created from template would have either no organizations in a marked space, or an organization which is not on the space. + :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. + :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. + :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. + :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. + :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. + :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. + :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. + :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. + :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. """ return self._api_client.call_api( @@ -702,6 +815,24 @@ def create_from_template( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, + "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, + "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, + "InvalidDescription": filesystem_errors.InvalidDescription, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "InvalidOrganizations": filesystem_errors.InvalidOrganizations, + "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, + "InvalidVariable": filesystem_errors.InvalidVariable, + "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, + "MissingVariableValue": filesystem_errors.MissingVariableValue, + "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, + "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, + "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, + "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, + }, ), ) @@ -725,6 +856,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Project] + + :raises ProjectNotFound: The given Project could not be found. """ return self._api_client.call_api( @@ -744,6 +877,9 @@ def get( body_type=None, response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, ), ) @@ -796,6 +932,7 @@ def organizations( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -854,6 +991,7 @@ def organizations_page( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -880,6 +1018,8 @@ def remove_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. """ return self._api_client.call_api( @@ -906,6 +1046,9 @@ def remove_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, + }, ), ) @@ -950,6 +1093,8 @@ def add_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddOrganizationsPermissionDenied: Could not addOrganizations the Project. """ return self._api_client.stream_api( @@ -976,6 +1121,9 @@ def add_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddOrganizationsPermissionDenied": filesystem_errors.AddOrganizationsPermissionDenied, + }, ), ) @@ -1019,6 +1167,15 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Project] + + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises CreateProjectPermissionDenied: Could not create the Project. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` or be too long. + :raises InvalidRoleIds: A roleId referenced in either default roles or role grants does not exist in the project role set for the space. + :raises OrganizationsNotFound: At least one organization RID could not be found. + :raises ProjectCreationNotSupported: Project creation is not supported in the current user's space. + :raises ProjectNameAlreadyExists: The requested display name for the created project is already being used in the space. + :raises SpaceNotFound: The referenced space cannot be found. """ return self._api_client.stream_api( @@ -1056,6 +1213,16 @@ def create( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "CreateProjectPermissionDenied": filesystem_errors.CreateProjectPermissionDenied, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidRoleIds": filesystem_errors.InvalidRoleIds, + "OrganizationsNotFound": filesystem_errors.OrganizationsNotFound, + "ProjectCreationNotSupported": filesystem_errors.ProjectCreationNotSupported, + "ProjectNameAlreadyExists": filesystem_errors.ProjectNameAlreadyExists, + "SpaceNotFound": filesystem_errors.SpaceNotFound, + }, ), ) @@ -1091,6 +1258,23 @@ def create_from_template( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Project] + + :raises AddGroupToParentGroupPermissionDenied: The user is not authorized to add a a group to the parent group required to create the project from template. + :raises CreateGroupPermissionDenied: The user is not authorized to create the group in the organization required to create the project from template. + :raises CreateProjectFromTemplatePermissionDenied: Could not createFromTemplate the Project. + :raises CreateProjectNoOwnerLikeRoleGrant: The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. + :raises DefaultRolesNotInSpaceRoleSet: The requested default roles are not in the role set of the space for the project template. + :raises InvalidDescription: Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. + :raises InvalidOrganizationHierarchy: The project created from template would have either no organizations in a marked space, or an organization which is not on the space. + :raises InvalidOrganizations: Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. + :raises InvalidPrincipalIdsForGroupTemplate: The template requested for project creation contains principal IDs that do not exist. + :raises InvalidVariable: A variable referenced in the request to create project from template is not defined on the template. + :raises InvalidVariableEnumOption: The value passed in the request to create project from template for an enum type variable is not a valid option. + :raises MissingVariableValue: A variable defined on the template requested for project creation does not have a value set in the request. + :raises NotAuthorizedToApplyOrganization: The user is not authorized to apply at least one of the organization markings required to create the project from template. + :raises ProjectTemplateNotFound: The project template RID referenced cannot be found. + :raises TemplateGroupNameConflict: Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. + :raises TemplateMarkingNameConflict: Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. """ return self._api_client.stream_api( @@ -1126,6 +1310,24 @@ def create_from_template( ), response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "AddGroupToParentGroupPermissionDenied": filesystem_errors.AddGroupToParentGroupPermissionDenied, + "CreateGroupPermissionDenied": filesystem_errors.CreateGroupPermissionDenied, + "CreateProjectFromTemplatePermissionDenied": filesystem_errors.CreateProjectFromTemplatePermissionDenied, + "CreateProjectNoOwnerLikeRoleGrant": filesystem_errors.CreateProjectNoOwnerLikeRoleGrant, + "DefaultRolesNotInSpaceRoleSet": filesystem_errors.DefaultRolesNotInSpaceRoleSet, + "InvalidDescription": filesystem_errors.InvalidDescription, + "InvalidOrganizationHierarchy": filesystem_errors.InvalidOrganizationHierarchy, + "InvalidOrganizations": filesystem_errors.InvalidOrganizations, + "InvalidPrincipalIdsForGroupTemplate": filesystem_errors.InvalidPrincipalIdsForGroupTemplate, + "InvalidVariable": filesystem_errors.InvalidVariable, + "InvalidVariableEnumOption": filesystem_errors.InvalidVariableEnumOption, + "MissingVariableValue": filesystem_errors.MissingVariableValue, + "NotAuthorizedToApplyOrganization": filesystem_errors.NotAuthorizedToApplyOrganization, + "ProjectTemplateNotFound": filesystem_errors.ProjectTemplateNotFound, + "TemplateGroupNameConflict": filesystem_errors.TemplateGroupNameConflict, + "TemplateMarkingNameConflict": filesystem_errors.TemplateMarkingNameConflict, + }, ), ) @@ -1149,6 +1351,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Project] + + :raises ProjectNotFound: The given Project could not be found. """ return self._api_client.stream_api( @@ -1168,6 +1372,9 @@ def get( body_type=None, response_type=Project, request_timeout=request_timeout, + throwable_errors={ + "ProjectNotFound": filesystem_errors.ProjectNotFound, + }, ), ) @@ -1220,6 +1427,7 @@ def organizations( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1278,6 +1486,7 @@ def organizations_page( body_type=None, response_type=ListOrganizationsOfProjectResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1304,6 +1513,8 @@ def remove_organizations( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises RemoveOrganizationsPermissionDenied: Could not removeOrganizations the Project. """ return self._api_client.stream_api( @@ -1330,5 +1541,8 @@ def remove_organizations( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveOrganizationsPermissionDenied": filesystem_errors.RemoveOrganizationsPermissionDenied, + }, ), ) diff --git a/foundry/v2/filesystem/resource.py b/foundry/v2/filesystem/resource.py index 097c718a2..b9b6695f9 100644 --- a/foundry/v2/filesystem/resource.py +++ b/foundry/v2/filesystem/resource.py @@ -38,6 +38,7 @@ from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._access_requirements import AccessRequirements from foundry.v2.filesystem.models._list_markings_of_resource_response import ( ListMarkingsOfResourceResponse, @@ -93,6 +94,8 @@ def add_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. """ return self._api_client.call_api( @@ -119,6 +122,9 @@ def add_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, + }, ), ).decode() @@ -144,6 +150,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteResourcePermissionDenied: Could not delete the Resource. """ return self._api_client.call_api( @@ -161,6 +169,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, + }, ), ).decode() @@ -184,6 +195,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Resource + + :raises ResourceNotFound: The given Resource could not be found. """ return self._api_client.call_api( @@ -203,6 +216,9 @@ def get( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, ), ).decode() @@ -228,6 +244,8 @@ def get_access_requirements( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: AccessRequirements + + :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. """ return self._api_client.call_api( @@ -247,6 +265,9 @@ def get_access_requirements( body_type=None, response_type=AccessRequirements, request_timeout=request_timeout, + throwable_errors={ + "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, + }, ), ).decode() @@ -270,6 +291,8 @@ def get_by_path( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Resource + + :raises GetByPathPermissionDenied: Could not getByPath the Resource. """ return self._api_client.call_api( @@ -288,6 +311,9 @@ def get_by_path( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, + }, ), ).decode() @@ -340,6 +366,7 @@ def markings( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -398,6 +425,7 @@ def markings_page( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -423,6 +451,8 @@ def permanently_delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. """ return self._api_client.call_api( @@ -440,6 +470,9 @@ def permanently_delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, + }, ), ).decode() @@ -466,6 +499,8 @@ def remove_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. """ return self._api_client.call_api( @@ -492,6 +527,9 @@ def remove_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, + }, ), ).decode() @@ -517,6 +555,8 @@ def restore( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises RestoreResourcePermissionDenied: Could not restore the Resource. """ return self._api_client.call_api( @@ -534,6 +574,9 @@ def restore( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, + }, ), ).decode() @@ -578,6 +621,8 @@ def add_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. """ return self._api_client.call_api( @@ -604,6 +649,9 @@ def add_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, + }, ), ) @@ -629,6 +677,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteResourcePermissionDenied: Could not delete the Resource. """ return self._api_client.call_api( @@ -646,6 +696,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, + }, ), ) @@ -669,6 +722,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Resource] + + :raises ResourceNotFound: The given Resource could not be found. """ return self._api_client.call_api( @@ -688,6 +743,9 @@ def get( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, ), ) @@ -713,6 +771,8 @@ def get_access_requirements( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[AccessRequirements] + + :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. """ return self._api_client.call_api( @@ -732,6 +792,9 @@ def get_access_requirements( body_type=None, response_type=AccessRequirements, request_timeout=request_timeout, + throwable_errors={ + "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, + }, ), ) @@ -755,6 +818,8 @@ def get_by_path( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Resource] + + :raises GetByPathPermissionDenied: Could not getByPath the Resource. """ return self._api_client.call_api( @@ -773,6 +838,9 @@ def get_by_path( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, + }, ), ) @@ -825,6 +893,7 @@ def markings( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -883,6 +952,7 @@ def markings_page( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -908,6 +978,8 @@ def permanently_delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. """ return self._api_client.call_api( @@ -925,6 +997,9 @@ def permanently_delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, + }, ), ) @@ -951,6 +1026,8 @@ def remove_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. """ return self._api_client.call_api( @@ -977,6 +1054,9 @@ def remove_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, + }, ), ) @@ -1002,6 +1082,8 @@ def restore( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises RestoreResourcePermissionDenied: Could not restore the Resource. """ return self._api_client.call_api( @@ -1019,6 +1101,9 @@ def restore( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, + }, ), ) @@ -1063,6 +1148,8 @@ def add_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddMarkingsPermissionDenied: Could not addMarkings the Resource. """ return self._api_client.stream_api( @@ -1089,6 +1176,9 @@ def add_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddMarkingsPermissionDenied": filesystem_errors.AddMarkingsPermissionDenied, + }, ), ) @@ -1114,6 +1204,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteResourcePermissionDenied: Could not delete the Resource. """ return self._api_client.stream_api( @@ -1131,6 +1223,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteResourcePermissionDenied": filesystem_errors.DeleteResourcePermissionDenied, + }, ), ) @@ -1154,6 +1249,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Resource] + + :raises ResourceNotFound: The given Resource could not be found. """ return self._api_client.stream_api( @@ -1173,6 +1270,9 @@ def get( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "ResourceNotFound": filesystem_errors.ResourceNotFound, + }, ), ) @@ -1198,6 +1298,8 @@ def get_access_requirements( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[AccessRequirements] + + :raises GetAccessRequirementsPermissionDenied: Could not getAccessRequirements the Resource. """ return self._api_client.stream_api( @@ -1217,6 +1319,9 @@ def get_access_requirements( body_type=None, response_type=AccessRequirements, request_timeout=request_timeout, + throwable_errors={ + "GetAccessRequirementsPermissionDenied": filesystem_errors.GetAccessRequirementsPermissionDenied, + }, ), ) @@ -1240,6 +1345,8 @@ def get_by_path( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Resource] + + :raises GetByPathPermissionDenied: Could not getByPath the Resource. """ return self._api_client.stream_api( @@ -1258,6 +1365,9 @@ def get_by_path( body_type=None, response_type=Resource, request_timeout=request_timeout, + throwable_errors={ + "GetByPathPermissionDenied": filesystem_errors.GetByPathPermissionDenied, + }, ), ) @@ -1310,6 +1420,7 @@ def markings( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1368,6 +1479,7 @@ def markings_page( body_type=None, response_type=ListMarkingsOfResourceResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1393,6 +1505,8 @@ def permanently_delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PermanentlyDeleteResourcePermissionDenied: Could not permanentlyDelete the Resource. """ return self._api_client.stream_api( @@ -1410,6 +1524,9 @@ def permanently_delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PermanentlyDeleteResourcePermissionDenied": filesystem_errors.PermanentlyDeleteResourcePermissionDenied, + }, ), ) @@ -1436,6 +1553,8 @@ def remove_markings( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises RemoveMarkingsPermissionDenied: Could not removeMarkings the Resource. """ return self._api_client.stream_api( @@ -1462,6 +1581,9 @@ def remove_markings( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveMarkingsPermissionDenied": filesystem_errors.RemoveMarkingsPermissionDenied, + }, ), ) @@ -1487,6 +1609,8 @@ def restore( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises RestoreResourcePermissionDenied: Could not restore the Resource. """ return self._api_client.stream_api( @@ -1504,5 +1628,8 @@ def restore( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RestoreResourcePermissionDenied": filesystem_errors.RestoreResourcePermissionDenied, + }, ), ) diff --git a/foundry/v2/filesystem/resource_role.py b/foundry/v2/filesystem/resource_role.py index 0751cd1ac..6ad7bd2e7 100644 --- a/foundry/v2/filesystem/resource_role.py +++ b/foundry/v2/filesystem/resource_role.py @@ -38,6 +38,7 @@ from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._list_resource_roles_response import ( ListResourceRolesResponse, ) # NOQA @@ -90,6 +91,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. """ return self._api_client.call_api( @@ -116,6 +119,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, + }, ), ).decode() @@ -171,6 +177,7 @@ def list( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -232,6 +239,7 @@ def page( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -258,6 +266,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. """ return self._api_client.call_api( @@ -284,6 +294,9 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, + }, ), ).decode() @@ -328,6 +341,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. """ return self._api_client.call_api( @@ -354,6 +369,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, + }, ), ) @@ -409,6 +427,7 @@ def list( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -470,6 +489,7 @@ def page( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -496,6 +516,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. """ return self._api_client.call_api( @@ -522,6 +544,9 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, + }, ), ) @@ -566,6 +591,8 @@ def add( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises AddResourceRolesPermissionDenied: Could not add the ResourceRole. """ return self._api_client.stream_api( @@ -592,6 +619,9 @@ def add( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "AddResourceRolesPermissionDenied": filesystem_errors.AddResourceRolesPermissionDenied, + }, ), ) @@ -647,6 +677,7 @@ def list( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -708,6 +739,7 @@ def page( body_type=None, response_type=ListResourceRolesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -734,6 +766,8 @@ def remove( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises RemoveResourceRolesPermissionDenied: Could not remove the ResourceRole. """ return self._api_client.stream_api( @@ -760,5 +794,8 @@ def remove( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "RemoveResourceRolesPermissionDenied": filesystem_errors.RemoveResourceRolesPermissionDenied, + }, ), ) diff --git a/foundry/v2/filesystem/space.py b/foundry/v2/filesystem/space.py index e2532fd27..b14042c11 100644 --- a/foundry/v2/filesystem/space.py +++ b/foundry/v2/filesystem/space.py @@ -91,6 +91,7 @@ def list( body_type=None, response_type=ListSpacesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -148,6 +149,7 @@ def list( body_type=None, response_type=ListSpacesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -205,5 +207,6 @@ def list( body_type=None, response_type=ListSpacesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/functions/errors/_execute_query_permission_denied.py b/foundry/v2/functions/errors/_execute_query_permission_denied.py index 49af10aad..5ca505572 100644 --- a/foundry/v2/functions/errors/_execute_query_permission_denied.py +++ b/foundry/v2/functions/errors/_execute_query_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.functions.models._query_api_name import QueryApiName @@ -34,7 +33,7 @@ class ExecuteQueryPermissionDeniedParameters(TypedDict): @dataclass -class ExecuteQueryPermissionDenied(PalantirRPCException): +class ExecuteQueryPermissionDenied(PermissionDeniedError): name: Literal["ExecuteQueryPermissionDenied"] parameters: ExecuteQueryPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_get_by_rid_queries_permission_denied.py b/foundry/v2/functions/errors/_get_by_rid_queries_permission_denied.py index 572cf4948..e9a12ccb8 100644 --- a/foundry/v2/functions/errors/_get_by_rid_queries_permission_denied.py +++ b/foundry/v2/functions/errors/_get_by_rid_queries_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class GetByRidQueriesPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class GetByRidQueriesPermissionDeniedParameters(TypedDict): @dataclass -class GetByRidQueriesPermissionDenied(PalantirRPCException): +class GetByRidQueriesPermissionDenied(PermissionDeniedError): name: Literal["GetByRidQueriesPermissionDenied"] parameters: GetByRidQueriesPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_invalid_query_parameter_value.py b/foundry/v2/functions/errors/_invalid_query_parameter_value.py index 831f33e2a..403b3f0de 100644 --- a/foundry/v2/functions/errors/_invalid_query_parameter_value.py +++ b/foundry/v2/functions/errors/_invalid_query_parameter_value.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.functions.models._data_value import DataValue from foundry.v2.functions.models._parameter_id import ParameterId from foundry.v2.functions.models._query_data_type_dict import QueryDataTypeDict @@ -44,7 +43,7 @@ class InvalidQueryParameterValueParameters(TypedDict): @dataclass -class InvalidQueryParameterValue(PalantirRPCException): +class InvalidQueryParameterValue(BadRequestError): name: Literal["InvalidQueryParameterValue"] parameters: InvalidQueryParameterValueParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_missing_parameter.py b/foundry/v2/functions/errors/_missing_parameter.py index 2496d21e5..55b8a14e7 100644 --- a/foundry/v2/functions/errors/_missing_parameter.py +++ b/foundry/v2/functions/errors/_missing_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.functions.models._parameter_id import ParameterId @@ -38,7 +37,7 @@ class MissingParameterParameters(TypedDict): @dataclass -class MissingParameter(PalantirRPCException): +class MissingParameter(BadRequestError): name: Literal["MissingParameter"] parameters: MissingParameterParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_query_encountered_user_facing_error.py b/foundry/v2/functions/errors/_query_encountered_user_facing_error.py index 015d18b2e..1dce373ac 100644 --- a/foundry/v2/functions/errors/_query_encountered_user_facing_error.py +++ b/foundry/v2/functions/errors/_query_encountered_user_facing_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.functions.models._function_rid import FunctionRid from foundry.v2.functions.models._function_version import FunctionVersion @@ -42,7 +41,7 @@ class QueryEncounteredUserFacingErrorParameters(TypedDict): @dataclass -class QueryEncounteredUserFacingError(PalantirRPCException): +class QueryEncounteredUserFacingError(ConflictError): name: Literal["QueryEncounteredUserFacingError"] parameters: QueryEncounteredUserFacingErrorParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_query_memory_exceeded_limit.py b/foundry/v2/functions/errors/_query_memory_exceeded_limit.py index 015dbded7..99b1875a3 100644 --- a/foundry/v2/functions/errors/_query_memory_exceeded_limit.py +++ b/foundry/v2/functions/errors/_query_memory_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.functions.models._function_rid import FunctionRid from foundry.v2.functions.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryMemoryExceededLimitParameters(TypedDict): @dataclass -class QueryMemoryExceededLimit(PalantirRPCException): +class QueryMemoryExceededLimit(InternalServerError): name: Literal["QueryMemoryExceededLimit"] parameters: QueryMemoryExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_query_not_found.py b/foundry/v2/functions/errors/_query_not_found.py index c413f6191..614742df7 100644 --- a/foundry/v2/functions/errors/_query_not_found.py +++ b/foundry/v2/functions/errors/_query_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.functions.models._query_api_name import QueryApiName @@ -34,7 +33,7 @@ class QueryNotFoundParameters(TypedDict): @dataclass -class QueryNotFound(PalantirRPCException): +class QueryNotFound(NotFoundError): name: Literal["QueryNotFound"] parameters: QueryNotFoundParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_query_runtime_error.py b/foundry/v2/functions/errors/_query_runtime_error.py index 69d027185..9e1b6c079 100644 --- a/foundry/v2/functions/errors/_query_runtime_error.py +++ b/foundry/v2/functions/errors/_query_runtime_error.py @@ -19,11 +19,10 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.functions.models._function_rid import FunctionRid from foundry.v2.functions.models._function_version import FunctionVersion from foundry.v2.functions.models._query_runtime_error_parameter import ( @@ -48,7 +47,7 @@ class QueryRuntimeErrorParameters(TypedDict): @dataclass -class QueryRuntimeError(PalantirRPCException): +class QueryRuntimeError(BadRequestError): name: Literal["QueryRuntimeError"] parameters: QueryRuntimeErrorParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_query_time_exceeded_limit.py b/foundry/v2/functions/errors/_query_time_exceeded_limit.py index 579391f90..5bf516f2f 100644 --- a/foundry/v2/functions/errors/_query_time_exceeded_limit.py +++ b/foundry/v2/functions/errors/_query_time_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.functions.models._function_rid import FunctionRid from foundry.v2.functions.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryTimeExceededLimitParameters(TypedDict): @dataclass -class QueryTimeExceededLimit(PalantirRPCException): +class QueryTimeExceededLimit(InternalServerError): name: Literal["QueryTimeExceededLimit"] parameters: QueryTimeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_unknown_parameter.py b/foundry/v2/functions/errors/_unknown_parameter.py index c629341b3..2a3711c49 100644 --- a/foundry/v2/functions/errors/_unknown_parameter.py +++ b/foundry/v2/functions/errors/_unknown_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.functions.models._parameter_id import ParameterId @@ -40,7 +39,7 @@ class UnknownParameterParameters(TypedDict): @dataclass -class UnknownParameter(PalantirRPCException): +class UnknownParameter(BadRequestError): name: Literal["UnknownParameter"] parameters: UnknownParameterParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_value_type_not_found.py b/foundry/v2/functions/errors/_value_type_not_found.py index 5b8fedea8..87d04ce50 100644 --- a/foundry/v2/functions/errors/_value_type_not_found.py +++ b/foundry/v2/functions/errors/_value_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.functions.models._value_type_rid import ValueTypeRid @@ -34,7 +33,7 @@ class ValueTypeNotFoundParameters(TypedDict): @dataclass -class ValueTypeNotFound(PalantirRPCException): +class ValueTypeNotFound(NotFoundError): name: Literal["ValueTypeNotFound"] parameters: ValueTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/functions/errors/_version_id_not_found.py b/foundry/v2/functions/errors/_version_id_not_found.py index b28e3f203..c1be9974f 100644 --- a/foundry/v2/functions/errors/_version_id_not_found.py +++ b/foundry/v2/functions/errors/_version_id_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.functions.models._value_type_rid import ValueTypeRid from foundry.v2.functions.models._value_type_version_id import ValueTypeVersionId @@ -37,7 +36,7 @@ class VersionIdNotFoundParameters(TypedDict): @dataclass -class VersionIdNotFound(PalantirRPCException): +class VersionIdNotFound(NotFoundError): name: Literal["VersionIdNotFound"] parameters: VersionIdNotFoundParameters error_instance_id: str diff --git a/foundry/v2/functions/query.py b/foundry/v2/functions/query.py index 1b7b370f4..fc47cb7ca 100644 --- a/foundry/v2/functions/query.py +++ b/foundry/v2/functions/query.py @@ -32,6 +32,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.functions import errors as functions_errors from foundry.v2.functions.models._data_value import DataValue from foundry.v2.functions.models._execute_query_response import ExecuteQueryResponse from foundry.v2.functions.models._function_rid import FunctionRid @@ -87,6 +88,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ExecuteQueryResponse + + :raises ExecuteQueryPermissionDenied: Could not execute the Query. """ return self._api_client.call_api( @@ -114,6 +117,9 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={ + "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, + }, ), ).decode() @@ -138,6 +144,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Query + + :raises QueryNotFound: The given Query could not be found. """ return self._api_client.call_api( @@ -157,6 +165,9 @@ def get( body_type=None, response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "QueryNotFound": functions_errors.QueryNotFound, + }, ), ).decode() @@ -181,6 +192,8 @@ def get_by_rid( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Query + + :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. """ return self._api_client.call_api( @@ -206,6 +219,9 @@ def get_by_rid( ), response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, + }, ), ).decode() @@ -253,6 +269,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ExecuteQueryResponse] + + :raises ExecuteQueryPermissionDenied: Could not execute the Query. """ return self._api_client.call_api( @@ -280,6 +298,9 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={ + "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, + }, ), ) @@ -304,6 +325,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Query] + + :raises QueryNotFound: The given Query could not be found. """ return self._api_client.call_api( @@ -323,6 +346,9 @@ def get( body_type=None, response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "QueryNotFound": functions_errors.QueryNotFound, + }, ), ) @@ -347,6 +373,8 @@ def get_by_rid( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Query] + + :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. """ return self._api_client.call_api( @@ -372,6 +400,9 @@ def get_by_rid( ), response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, + }, ), ) @@ -419,6 +450,8 @@ def execute( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ExecuteQueryResponse] + + :raises ExecuteQueryPermissionDenied: Could not execute the Query. """ return self._api_client.stream_api( @@ -446,6 +479,9 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={ + "ExecuteQueryPermissionDenied": functions_errors.ExecuteQueryPermissionDenied, + }, ), ) @@ -470,6 +506,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Query] + + :raises QueryNotFound: The given Query could not be found. """ return self._api_client.stream_api( @@ -489,6 +527,9 @@ def get( body_type=None, response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "QueryNotFound": functions_errors.QueryNotFound, + }, ), ) @@ -513,6 +554,8 @@ def get_by_rid( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Query] + + :raises GetByRidQueriesPermissionDenied: Could not getByRid the Query. """ return self._api_client.stream_api( @@ -538,5 +581,8 @@ def get_by_rid( ), response_type=Query, request_timeout=request_timeout, + throwable_errors={ + "GetByRidQueriesPermissionDenied": functions_errors.GetByRidQueriesPermissionDenied, + }, ), ) diff --git a/foundry/v2/functions/value_type.py b/foundry/v2/functions/value_type.py index 7638f20ca..101d7fd19 100644 --- a/foundry/v2/functions/value_type.py +++ b/foundry/v2/functions/value_type.py @@ -31,6 +31,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.functions import errors as functions_errors from foundry.v2.functions.models._value_type import ValueType from foundry.v2.functions.models._value_type_rid import ValueTypeRid from foundry.v2.functions.version_id import VersionIdClient @@ -79,6 +80,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ValueType + + :raises ValueTypeNotFound: The given ValueType could not be found. """ return self._api_client.call_api( @@ -98,6 +101,9 @@ def get( body_type=None, response_type=ValueType, request_timeout=request_timeout, + throwable_errors={ + "ValueTypeNotFound": functions_errors.ValueTypeNotFound, + }, ), ).decode() @@ -140,6 +146,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ValueType] + + :raises ValueTypeNotFound: The given ValueType could not be found. """ return self._api_client.call_api( @@ -159,6 +167,9 @@ def get( body_type=None, response_type=ValueType, request_timeout=request_timeout, + throwable_errors={ + "ValueTypeNotFound": functions_errors.ValueTypeNotFound, + }, ), ) @@ -201,6 +212,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ValueType] + + :raises ValueTypeNotFound: The given ValueType could not be found. """ return self._api_client.stream_api( @@ -220,5 +233,8 @@ def get( body_type=None, response_type=ValueType, request_timeout=request_timeout, + throwable_errors={ + "ValueTypeNotFound": functions_errors.ValueTypeNotFound, + }, ), ) diff --git a/foundry/v2/functions/version_id.py b/foundry/v2/functions/version_id.py index 81b976589..4ab31cbf2 100644 --- a/foundry/v2/functions/version_id.py +++ b/foundry/v2/functions/version_id.py @@ -31,6 +31,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.functions import errors as functions_errors from foundry.v2.functions.models._value_type_rid import ValueTypeRid from foundry.v2.functions.models._value_type_version_id import ValueTypeVersionId from foundry.v2.functions.models._version_id import VersionId @@ -81,6 +82,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: VersionId + + :raises VersionIdNotFound: The given VersionId could not be found. """ return self._api_client.call_api( @@ -101,6 +104,9 @@ def get( body_type=None, response_type=VersionId, request_timeout=request_timeout, + throwable_errors={ + "VersionIdNotFound": functions_errors.VersionIdNotFound, + }, ), ).decode() @@ -146,6 +152,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[VersionId] + + :raises VersionIdNotFound: The given VersionId could not be found. """ return self._api_client.call_api( @@ -166,6 +174,9 @@ def get( body_type=None, response_type=VersionId, request_timeout=request_timeout, + throwable_errors={ + "VersionIdNotFound": functions_errors.VersionIdNotFound, + }, ), ) @@ -211,6 +222,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[VersionId] + + :raises VersionIdNotFound: The given VersionId could not be found. """ return self._api_client.stream_api( @@ -231,5 +244,8 @@ def get( body_type=None, response_type=VersionId, request_timeout=request_timeout, + throwable_errors={ + "VersionIdNotFound": functions_errors.VersionIdNotFound, + }, ), ) diff --git a/foundry/v2/media_sets/errors/_conflicting_media_set_identifiers.py b/foundry/v2/media_sets/errors/_conflicting_media_set_identifiers.py index 1ae8bb7d6..c7f53e6f4 100644 --- a/foundry/v2/media_sets/errors/_conflicting_media_set_identifiers.py +++ b/foundry/v2/media_sets/errors/_conflicting_media_set_identifiers.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ConflictingMediaSetIdentifiersParameters(TypedDict): @@ -31,7 +30,7 @@ class ConflictingMediaSetIdentifiersParameters(TypedDict): @dataclass -class ConflictingMediaSetIdentifiers(PalantirRPCException): +class ConflictingMediaSetIdentifiers(BadRequestError): name: Literal["ConflictingMediaSetIdentifiers"] parameters: ConflictingMediaSetIdentifiersParameters error_instance_id: str diff --git a/foundry/v2/media_sets/errors/_media_item_not_found.py b/foundry/v2/media_sets/errors/_media_item_not_found.py index 8d1681ab8..bd56eb612 100644 --- a/foundry/v2/media_sets/errors/_media_item_not_found.py +++ b/foundry/v2/media_sets/errors/_media_item_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.core.models._media_item_rid import MediaItemRid from foundry.v2.core.models._media_set_rid import MediaSetRid @@ -37,7 +36,7 @@ class MediaItemNotFoundParameters(TypedDict): @dataclass -class MediaItemNotFound(PalantirRPCException): +class MediaItemNotFound(NotFoundError): name: Literal["MediaItemNotFound"] parameters: MediaItemNotFoundParameters error_instance_id: str diff --git a/foundry/v2/media_sets/media_set.py b/foundry/v2/media_sets/media_set.py index 47e802db7..83b590c1c 100644 --- a/foundry/v2/media_sets/media_set.py +++ b/foundry/v2/media_sets/media_set.py @@ -117,6 +117,7 @@ def abort( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -164,6 +165,7 @@ def commit( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -213,6 +215,7 @@ def create( body_type=None, response_type=TransactionId, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -266,6 +269,7 @@ def info( body_type=None, response_type=GetMediaItemInfoResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -445,6 +449,7 @@ def read( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -498,6 +503,7 @@ def reference( body_type=None, response_type=MediaReference, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -569,6 +575,7 @@ def upload( body_type=bytes, response_type=PutMediaItemResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -634,6 +641,7 @@ def abort( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -681,6 +689,7 @@ def commit( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -730,6 +739,7 @@ def create( body_type=None, response_type=TransactionId, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -783,6 +793,7 @@ def info( body_type=None, response_type=GetMediaItemInfoResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -836,6 +847,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -889,6 +901,7 @@ def reference( body_type=None, response_type=MediaReference, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -960,6 +973,7 @@ def upload( body_type=bytes, response_type=PutMediaItemResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1025,6 +1039,7 @@ def abort( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1072,6 +1087,7 @@ def commit( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1121,6 +1137,7 @@ def create( body_type=None, response_type=TransactionId, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1174,6 +1191,7 @@ def info( body_type=None, response_type=GetMediaItemInfoResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1227,6 +1245,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1280,6 +1299,7 @@ def reference( body_type=None, response_type=MediaReference, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1351,5 +1371,6 @@ def upload( body_type=bytes, response_type=PutMediaItemResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/action.py b/foundry/v2/ontologies/action.py index e26d5260a..14b1ad3c7 100644 --- a/foundry/v2/ontologies/action.py +++ b/foundry/v2/ontologies/action.py @@ -160,6 +160,7 @@ def apply( ), response_type=SyncApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -244,6 +245,7 @@ def apply_batch( ), response_type=BatchApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -339,6 +341,7 @@ def apply( ), response_type=SyncApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -423,6 +426,7 @@ def apply_batch( ), response_type=BatchApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -518,6 +522,7 @@ def apply( ), response_type=SyncApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -602,5 +607,6 @@ def apply_batch( ), response_type=BatchApplyActionResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/action_type.py b/foundry/v2/ontologies/action_type.py index 8ef79fe8a..74f1101b0 100644 --- a/foundry/v2/ontologies/action_type.py +++ b/foundry/v2/ontologies/action_type.py @@ -104,6 +104,7 @@ def get( body_type=None, response_type=ActionTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -156,6 +157,7 @@ def list( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -214,6 +216,7 @@ def page( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -276,6 +279,7 @@ def get( body_type=None, response_type=ActionTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -328,6 +332,7 @@ def list( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -386,6 +391,7 @@ def page( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -448,6 +454,7 @@ def get( body_type=None, response_type=ActionTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -500,6 +507,7 @@ def list( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -558,5 +566,6 @@ def page( body_type=None, response_type=ListActionTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/attachment.py b/foundry/v2/ontologies/attachment.py index 9e78dc1c3..18e8a4917 100644 --- a/foundry/v2/ontologies/attachment.py +++ b/foundry/v2/ontologies/attachment.py @@ -102,6 +102,7 @@ def get( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -245,6 +246,7 @@ def read( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -302,6 +304,7 @@ def upload( body_type=bytes, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -361,6 +364,7 @@ def get( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -402,6 +406,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -459,6 +464,7 @@ def upload( body_type=bytes, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -518,6 +524,7 @@ def get( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -559,6 +566,7 @@ def read( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -616,5 +624,6 @@ def upload( body_type=bytes, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/attachment_property.py b/foundry/v2/ontologies/attachment_property.py index a4f9835dc..453036a20 100644 --- a/foundry/v2/ontologies/attachment_property.py +++ b/foundry/v2/ontologies/attachment_property.py @@ -133,6 +133,7 @@ def get_attachment( body_type=None, response_type=AttachmentMetadataResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -199,6 +200,7 @@ def get_attachment_by_rid( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -408,6 +410,7 @@ def read_attachment( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -638,6 +641,7 @@ def read_attachment_by_rid( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -718,6 +722,7 @@ def get_attachment( body_type=None, response_type=AttachmentMetadataResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -784,6 +789,7 @@ def get_attachment_by_rid( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -846,6 +852,7 @@ def read_attachment( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -914,6 +921,7 @@ def read_attachment_by_rid( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -994,6 +1002,7 @@ def get_attachment( body_type=None, response_type=AttachmentMetadataResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1060,6 +1069,7 @@ def get_attachment_by_rid( body_type=None, response_type=AttachmentV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1122,6 +1132,7 @@ def read_attachment( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1190,5 +1201,6 @@ def read_attachment_by_rid( body_type=None, response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/errors/_action_contains_duplicate_edits.py b/foundry/v2/ontologies/errors/_action_contains_duplicate_edits.py index 20f198eaa..744f6411e 100644 --- a/foundry/v2/ontologies/errors/_action_contains_duplicate_edits.py +++ b/foundry/v2/ontologies/errors/_action_contains_duplicate_edits.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ActionContainsDuplicateEditsParameters(TypedDict): @@ -31,7 +30,7 @@ class ActionContainsDuplicateEditsParameters(TypedDict): @dataclass -class ActionContainsDuplicateEdits(PalantirRPCException): +class ActionContainsDuplicateEdits(ConflictError): name: Literal["ActionContainsDuplicateEdits"] parameters: ActionContainsDuplicateEditsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_edited_properties_not_found.py b/foundry/v2/ontologies/errors/_action_edited_properties_not_found.py index f94318570..874bf364e 100644 --- a/foundry/v2/ontologies/errors/_action_edited_properties_not_found.py +++ b/foundry/v2/ontologies/errors/_action_edited_properties_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ActionEditedPropertiesNotFoundParameters(TypedDict): @@ -34,7 +33,7 @@ class ActionEditedPropertiesNotFoundParameters(TypedDict): @dataclass -class ActionEditedPropertiesNotFound(PalantirRPCException): +class ActionEditedPropertiesNotFound(BadRequestError): name: Literal["ActionEditedPropertiesNotFound"] parameters: ActionEditedPropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_edits_read_only_entity.py b/foundry/v2/ontologies/errors/_action_edits_read_only_entity.py index 22f4f97a4..5f182c4b8 100644 --- a/foundry/v2/ontologies/errors/_action_edits_read_only_entity.py +++ b/foundry/v2/ontologies/errors/_action_edits_read_only_entity.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_rid import ObjectTypeRid @@ -35,7 +34,7 @@ class ActionEditsReadOnlyEntityParameters(TypedDict): @dataclass -class ActionEditsReadOnlyEntity(PalantirRPCException): +class ActionEditsReadOnlyEntity(BadRequestError): name: Literal["ActionEditsReadOnlyEntity"] parameters: ActionEditsReadOnlyEntityParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_not_found.py b/foundry/v2/ontologies/errors/_action_not_found.py index c710bbadf..1570dd32c 100644 --- a/foundry/v2/ontologies/errors/_action_not_found.py +++ b/foundry/v2/ontologies/errors/_action_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._action_rid import ActionRid @@ -34,7 +33,7 @@ class ActionNotFoundParameters(TypedDict): @dataclass -class ActionNotFound(PalantirRPCException): +class ActionNotFound(NotFoundError): name: Literal["ActionNotFound"] parameters: ActionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_parameter_interface_type_not_found.py b/foundry/v2/ontologies/errors/_action_parameter_interface_type_not_found.py index 2fd4a7abb..3aa2599c1 100644 --- a/foundry/v2/ontologies/errors/_action_parameter_interface_type_not_found.py +++ b/foundry/v2/ontologies/errors/_action_parameter_interface_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterInterfaceTypeNotFoundParameters(TypedDict): @dataclass -class ActionParameterInterfaceTypeNotFound(PalantirRPCException): +class ActionParameterInterfaceTypeNotFound(NotFoundError): name: Literal["ActionParameterInterfaceTypeNotFound"] parameters: ActionParameterInterfaceTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_parameter_object_not_found.py b/foundry/v2/ontologies/errors/_action_parameter_object_not_found.py index 4502c0a0e..5735f8aaf 100644 --- a/foundry/v2/ontologies/errors/_action_parameter_object_not_found.py +++ b/foundry/v2/ontologies/errors/_action_parameter_object_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterObjectNotFoundParameters(TypedDict): @dataclass -class ActionParameterObjectNotFound(PalantirRPCException): +class ActionParameterObjectNotFound(NotFoundError): name: Literal["ActionParameterObjectNotFound"] parameters: ActionParameterObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_parameter_object_type_not_found.py b/foundry/v2/ontologies/errors/_action_parameter_object_type_not_found.py index 347dcf1fa..18a2cc09e 100644 --- a/foundry/v2/ontologies/errors/_action_parameter_object_type_not_found.py +++ b/foundry/v2/ontologies/errors/_action_parameter_object_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -34,7 +33,7 @@ class ActionParameterObjectTypeNotFoundParameters(TypedDict): @dataclass -class ActionParameterObjectTypeNotFound(PalantirRPCException): +class ActionParameterObjectTypeNotFound(NotFoundError): name: Literal["ActionParameterObjectTypeNotFound"] parameters: ActionParameterObjectTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_type_not_found.py b/foundry/v2/ontologies/errors/_action_type_not_found.py index 6ed4b6cca..bf59d49a3 100644 --- a/foundry/v2/ontologies/errors/_action_type_not_found.py +++ b/foundry/v2/ontologies/errors/_action_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v2.ontologies.models._action_type_rid import ActionTypeRid @@ -38,7 +37,7 @@ class ActionTypeNotFoundParameters(TypedDict): @dataclass -class ActionTypeNotFound(PalantirRPCException): +class ActionTypeNotFound(NotFoundError): name: Literal["ActionTypeNotFound"] parameters: ActionTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_action_validation_failed.py b/foundry/v2/ontologies/errors/_action_validation_failed.py index 1d366be79..7435effd0 100644 --- a/foundry/v2/ontologies/errors/_action_validation_failed.py +++ b/foundry/v2/ontologies/errors/_action_validation_failed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._action_type_api_name import ActionTypeApiName @@ -37,7 +36,7 @@ class ActionValidationFailedParameters(TypedDict): @dataclass -class ActionValidationFailed(PalantirRPCException): +class ActionValidationFailed(BadRequestError): name: Literal["ActionValidationFailed"] parameters: ActionValidationFailedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_aggregation_group_count_exceeded_limit.py b/foundry/v2/ontologies/errors/_aggregation_group_count_exceeded_limit.py index c4db90c42..ccc427482 100644 --- a/foundry/v2/ontologies/errors/_aggregation_group_count_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_aggregation_group_count_exceeded_limit.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationGroupCountExceededLimitParameters(TypedDict): @@ -42,7 +41,7 @@ class AggregationGroupCountExceededLimitParameters(TypedDict): @dataclass -class AggregationGroupCountExceededLimit(PalantirRPCException): +class AggregationGroupCountExceededLimit(BadRequestError): name: Literal["AggregationGroupCountExceededLimit"] parameters: AggregationGroupCountExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_aggregation_memory_exceeded_limit.py b/foundry/v2/ontologies/errors/_aggregation_memory_exceeded_limit.py index c32db089b..4b368d470 100644 --- a/foundry/v2/ontologies/errors/_aggregation_memory_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_aggregation_memory_exceeded_limit.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationMemoryExceededLimitParameters(TypedDict): @@ -42,7 +41,7 @@ class AggregationMemoryExceededLimitParameters(TypedDict): @dataclass -class AggregationMemoryExceededLimit(PalantirRPCException): +class AggregationMemoryExceededLimit(BadRequestError): name: Literal["AggregationMemoryExceededLimit"] parameters: AggregationMemoryExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py b/foundry/v2/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py index eac302232..d22d9d084 100644 --- a/foundry/v2/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_aggregation_nested_object_set_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AggregationNestedObjectSetSizeExceededLimitParameters(TypedDict): @@ -38,7 +37,7 @@ class AggregationNestedObjectSetSizeExceededLimitParameters(TypedDict): @dataclass -class AggregationNestedObjectSetSizeExceededLimit(PalantirRPCException): +class AggregationNestedObjectSetSizeExceededLimit(BadRequestError): name: Literal["AggregationNestedObjectSetSizeExceededLimit"] parameters: AggregationNestedObjectSetSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_apply_action_failed.py b/foundry/v2/ontologies/errors/_apply_action_failed.py index 5fe529fb9..f73fd1ee3 100644 --- a/foundry/v2/ontologies/errors/_apply_action_failed.py +++ b/foundry/v2/ontologies/errors/_apply_action_failed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ApplyActionFailedParameters(TypedDict): @@ -30,7 +29,7 @@ class ApplyActionFailedParameters(TypedDict): @dataclass -class ApplyActionFailed(PalantirRPCException): +class ApplyActionFailed(BadRequestError): name: Literal["ApplyActionFailed"] parameters: ApplyActionFailedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_attachment_not_found.py b/foundry/v2/ontologies/errors/_attachment_not_found.py index 0268b569c..788b3245a 100644 --- a/foundry/v2/ontologies/errors/_attachment_not_found.py +++ b/foundry/v2/ontologies/errors/_attachment_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._attachment_rid import AttachmentRid @@ -40,7 +39,7 @@ class AttachmentNotFoundParameters(TypedDict): @dataclass -class AttachmentNotFound(PalantirRPCException): +class AttachmentNotFound(NotFoundError): name: Literal["AttachmentNotFound"] parameters: AttachmentNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_attachment_size_exceeded_limit.py b/foundry/v2/ontologies/errors/_attachment_size_exceeded_limit.py index d5081a6fa..179a408bc 100644 --- a/foundry/v2/ontologies/errors/_attachment_size_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_attachment_size_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class AttachmentSizeExceededLimitParameters(TypedDict): @@ -38,7 +37,7 @@ class AttachmentSizeExceededLimitParameters(TypedDict): @dataclass -class AttachmentSizeExceededLimit(PalantirRPCException): +class AttachmentSizeExceededLimit(BadRequestError): name: Literal["AttachmentSizeExceededLimit"] parameters: AttachmentSizeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_composite_primary_key_not_supported.py b/foundry/v2/ontologies/errors/_composite_primary_key_not_supported.py index 3aea47ce2..f54ce4aa7 100644 --- a/foundry/v2/ontologies/errors/_composite_primary_key_not_supported.py +++ b/foundry/v2/ontologies/errors/_composite_primary_key_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -41,7 +40,7 @@ class CompositePrimaryKeyNotSupportedParameters(TypedDict): @dataclass -class CompositePrimaryKeyNotSupported(PalantirRPCException): +class CompositePrimaryKeyNotSupported(BadRequestError): name: Literal["CompositePrimaryKeyNotSupported"] parameters: CompositePrimaryKeyNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_derived_property_api_names_not_unique.py b/foundry/v2/ontologies/errors/_derived_property_api_names_not_unique.py index ad3ff569a..bf96403e9 100644 --- a/foundry/v2/ontologies/errors/_derived_property_api_names_not_unique.py +++ b/foundry/v2/ontologies/errors/_derived_property_api_names_not_unique.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._derived_property_api_name import DerivedPropertyApiName # NOQA @@ -35,7 +34,7 @@ class DerivedPropertyApiNamesNotUniqueParameters(TypedDict): @dataclass -class DerivedPropertyApiNamesNotUnique(PalantirRPCException): +class DerivedPropertyApiNamesNotUnique(BadRequestError): name: Literal["DerivedPropertyApiNamesNotUnique"] parameters: DerivedPropertyApiNamesNotUniqueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_duplicate_order_by.py b/foundry/v2/ontologies/errors/_duplicate_order_by.py index c41378c39..e782b4c8c 100644 --- a/foundry/v2/ontologies/errors/_duplicate_order_by.py +++ b/foundry/v2/ontologies/errors/_duplicate_order_by.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -35,7 +34,7 @@ class DuplicateOrderByParameters(TypedDict): @dataclass -class DuplicateOrderBy(PalantirRPCException): +class DuplicateOrderBy(BadRequestError): name: Literal["DuplicateOrderBy"] parameters: DuplicateOrderByParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_edit_object_permission_denied.py b/foundry/v2/ontologies/errors/_edit_object_permission_denied.py index a4dc1c791..48d2dcd4d 100644 --- a/foundry/v2/ontologies/errors/_edit_object_permission_denied.py +++ b/foundry/v2/ontologies/errors/_edit_object_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class EditObjectPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class EditObjectPermissionDeniedParameters(TypedDict): @dataclass -class EditObjectPermissionDenied(PalantirRPCException): +class EditObjectPermissionDenied(PermissionDeniedError): name: Literal["EditObjectPermissionDenied"] parameters: EditObjectPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_function_encountered_user_facing_error.py b/foundry/v2/ontologies/errors/_function_encountered_user_facing_error.py index 49fd3479d..e9cf8c24b 100644 --- a/foundry/v2/ontologies/errors/_function_encountered_user_facing_error.py +++ b/foundry/v2/ontologies/errors/_function_encountered_user_facing_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -42,7 +41,7 @@ class FunctionEncounteredUserFacingErrorParameters(TypedDict): @dataclass -class FunctionEncounteredUserFacingError(PalantirRPCException): +class FunctionEncounteredUserFacingError(BadRequestError): name: Literal["FunctionEncounteredUserFacingError"] parameters: FunctionEncounteredUserFacingErrorParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_function_execution_failed.py b/foundry/v2/ontologies/errors/_function_execution_failed.py index 03505e651..239e73eef 100644 --- a/foundry/v2/ontologies/errors/_function_execution_failed.py +++ b/foundry/v2/ontologies/errors/_function_execution_failed.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -41,7 +40,7 @@ class FunctionExecutionFailedParameters(TypedDict): @dataclass -class FunctionExecutionFailed(PalantirRPCException): +class FunctionExecutionFailed(BadRequestError): name: Literal["FunctionExecutionFailed"] parameters: FunctionExecutionFailedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_function_execution_timed_out.py b/foundry/v2/ontologies/errors/_function_execution_timed_out.py index 332d702b3..17f369e01 100644 --- a/foundry/v2/ontologies/errors/_function_execution_timed_out.py +++ b/foundry/v2/ontologies/errors/_function_execution_timed_out.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -36,7 +35,7 @@ class FunctionExecutionTimedOutParameters(TypedDict): @dataclass -class FunctionExecutionTimedOut(PalantirRPCException): +class FunctionExecutionTimedOut(InternalServerError): name: Literal["FunctionExecutionTimedOut"] parameters: FunctionExecutionTimedOutParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_function_invalid_input.py b/foundry/v2/ontologies/errors/_function_invalid_input.py index 0f4c81f27..10f74d483 100644 --- a/foundry/v2/ontologies/errors/_function_invalid_input.py +++ b/foundry/v2/ontologies/errors/_function_invalid_input.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -36,7 +35,7 @@ class FunctionInvalidInputParameters(TypedDict): @dataclass -class FunctionInvalidInput(PalantirRPCException): +class FunctionInvalidInput(BadRequestError): name: Literal["FunctionInvalidInput"] parameters: FunctionInvalidInputParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_interface_type_not_found.py b/foundry/v2/ontologies/errors/_interface_type_not_found.py index aa76d54ce..4532f0b92 100644 --- a/foundry/v2/ontologies/errors/_interface_type_not_found.py +++ b/foundry/v2/ontologies/errors/_interface_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._interface_type_api_name import InterfaceTypeApiName from foundry.v2.ontologies.models._interface_type_rid import InterfaceTypeRid @@ -38,7 +37,7 @@ class InterfaceTypeNotFoundParameters(TypedDict): @dataclass -class InterfaceTypeNotFound(PalantirRPCException): +class InterfaceTypeNotFound(NotFoundError): name: Literal["InterfaceTypeNotFound"] parameters: InterfaceTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_interface_types_not_found.py b/foundry/v2/ontologies/errors/_interface_types_not_found.py index 9769696bb..1797db63d 100644 --- a/foundry/v2/ontologies/errors/_interface_types_not_found.py +++ b/foundry/v2/ontologies/errors/_interface_types_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._interface_type_api_name import InterfaceTypeApiName from foundry.v2.ontologies.models._interface_type_rid import InterfaceTypeRid @@ -38,7 +37,7 @@ class InterfaceTypesNotFoundParameters(TypedDict): @dataclass -class InterfaceTypesNotFound(PalantirRPCException): +class InterfaceTypesNotFound(NotFoundError): name: Literal["InterfaceTypesNotFound"] parameters: InterfaceTypesNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_aggregation_ordering.py b/foundry/v2/ontologies/errors/_invalid_aggregation_ordering.py index ec905b556..37df7cf9e 100644 --- a/foundry/v2/ontologies/errors/_invalid_aggregation_ordering.py +++ b/foundry/v2/ontologies/errors/_invalid_aggregation_ordering.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAggregationOrderingParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAggregationOrderingParameters(TypedDict): @dataclass -class InvalidAggregationOrdering(PalantirRPCException): +class InvalidAggregationOrdering(BadRequestError): name: Literal["InvalidAggregationOrdering"] parameters: InvalidAggregationOrderingParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_aggregation_range.py b/foundry/v2/ontologies/errors/_invalid_aggregation_range.py index 1a9677510..d159f1a6e 100644 --- a/foundry/v2/ontologies/errors/_invalid_aggregation_range.py +++ b/foundry/v2/ontologies/errors/_invalid_aggregation_range.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAggregationRangeParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAggregationRangeParameters(TypedDict): @dataclass -class InvalidAggregationRange(PalantirRPCException): +class InvalidAggregationRange(BadRequestError): name: Literal["InvalidAggregationRange"] parameters: InvalidAggregationRangeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_aggregation_range_property_type.py b/foundry/v2/ontologies/errors/_invalid_aggregation_range_property_type.py index cf8c11764..25dcac9ed 100644 --- a/foundry/v2/ontologies/errors/_invalid_aggregation_range_property_type.py +++ b/foundry/v2/ontologies/errors/_invalid_aggregation_range_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidAggregationRangePropertyTypeParameters(TypedDict): @dataclass -class InvalidAggregationRangePropertyType(PalantirRPCException): +class InvalidAggregationRangePropertyType(BadRequestError): name: Literal["InvalidAggregationRangePropertyType"] parameters: InvalidAggregationRangePropertyTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_aggregation_range_value.py b/foundry/v2/ontologies/errors/_invalid_aggregation_range_value.py index be52a840e..719b31b4d 100644 --- a/foundry/v2/ontologies/errors/_invalid_aggregation_range_value.py +++ b/foundry/v2/ontologies/errors/_invalid_aggregation_range_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidAggregationRangeValueParameters(TypedDict): @dataclass -class InvalidAggregationRangeValue(PalantirRPCException): +class InvalidAggregationRangeValue(BadRequestError): name: Literal["InvalidAggregationRangeValue"] parameters: InvalidAggregationRangeValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_apply_action_option_combination.py b/foundry/v2/ontologies/errors/_invalid_apply_action_option_combination.py index a69b95efd..798830874 100644 --- a/foundry/v2/ontologies/errors/_invalid_apply_action_option_combination.py +++ b/foundry/v2/ontologies/errors/_invalid_apply_action_option_combination.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._apply_action_request_options import ( ApplyActionRequestOptions, ) # NOQA @@ -37,7 +36,7 @@ class InvalidApplyActionOptionCombinationParameters(TypedDict): @dataclass -class InvalidApplyActionOptionCombination(PalantirRPCException): +class InvalidApplyActionOptionCombination(BadRequestError): name: Literal["InvalidApplyActionOptionCombination"] parameters: InvalidApplyActionOptionCombinationParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_content_length.py b/foundry/v2/ontologies/errors/_invalid_content_length.py index 0395a050b..1eebcc2ea 100644 --- a/foundry/v2/ontologies/errors/_invalid_content_length.py +++ b/foundry/v2/ontologies/errors/_invalid_content_length.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidContentLengthParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidContentLengthParameters(TypedDict): @dataclass -class InvalidContentLength(PalantirRPCException): +class InvalidContentLength(BadRequestError): name: Literal["InvalidContentLength"] parameters: InvalidContentLengthParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_content_type.py b/foundry/v2/ontologies/errors/_invalid_content_type.py index 59fd3ad0e..204c9edf1 100644 --- a/foundry/v2/ontologies/errors/_invalid_content_type.py +++ b/foundry/v2/ontologies/errors/_invalid_content_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidContentTypeParameters(TypedDict): @@ -34,7 +33,7 @@ class InvalidContentTypeParameters(TypedDict): @dataclass -class InvalidContentType(PalantirRPCException): +class InvalidContentType(BadRequestError): name: Literal["InvalidContentType"] parameters: InvalidContentTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_duration_group_by_property_type.py b/foundry/v2/ontologies/errors/_invalid_duration_group_by_property_type.py index dd06376ab..a9a88600e 100644 --- a/foundry/v2/ontologies/errors/_invalid_duration_group_by_property_type.py +++ b/foundry/v2/ontologies/errors/_invalid_duration_group_by_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class InvalidDurationGroupByPropertyTypeParameters(TypedDict): @dataclass -class InvalidDurationGroupByPropertyType(PalantirRPCException): +class InvalidDurationGroupByPropertyType(BadRequestError): name: Literal["InvalidDurationGroupByPropertyType"] parameters: InvalidDurationGroupByPropertyTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_duration_group_by_value.py b/foundry/v2/ontologies/errors/_invalid_duration_group_by_value.py index f0b76f2a4..a66b65e6c 100644 --- a/foundry/v2/ontologies/errors/_invalid_duration_group_by_value.py +++ b/foundry/v2/ontologies/errors/_invalid_duration_group_by_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidDurationGroupByValueParameters(TypedDict): @@ -35,7 +34,7 @@ class InvalidDurationGroupByValueParameters(TypedDict): @dataclass -class InvalidDurationGroupByValue(PalantirRPCException): +class InvalidDurationGroupByValue(BadRequestError): name: Literal["InvalidDurationGroupByValue"] parameters: InvalidDurationGroupByValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_fields.py b/foundry/v2/ontologies/errors/_invalid_fields.py index 8893a4513..dfec1c450 100644 --- a/foundry/v2/ontologies/errors/_invalid_fields.py +++ b/foundry/v2/ontologies/errors/_invalid_fields.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidFieldsParameters(TypedDict): @@ -37,7 +36,7 @@ class InvalidFieldsParameters(TypedDict): @dataclass -class InvalidFields(PalantirRPCException): +class InvalidFields(BadRequestError): name: Literal["InvalidFields"] parameters: InvalidFieldsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_group_id.py b/foundry/v2/ontologies/errors/_invalid_group_id.py index b41f81158..493c19dfe 100644 --- a/foundry/v2/ontologies/errors/_invalid_group_id.py +++ b/foundry/v2/ontologies/errors/_invalid_group_id.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidGroupIdParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidGroupIdParameters(TypedDict): @dataclass -class InvalidGroupId(PalantirRPCException): +class InvalidGroupId(BadRequestError): name: Literal["InvalidGroupId"] parameters: InvalidGroupIdParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_order_type.py b/foundry/v2/ontologies/errors/_invalid_order_type.py index 1f1e05e16..8572530c6 100644 --- a/foundry/v2/ontologies/errors/_invalid_order_type.py +++ b/foundry/v2/ontologies/errors/_invalid_order_type.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._search_order_by_type import SearchOrderByType @@ -35,7 +34,7 @@ class InvalidOrderTypeParameters(TypedDict): @dataclass -class InvalidOrderType(PalantirRPCException): +class InvalidOrderType(BadRequestError): name: Literal["InvalidOrderType"] parameters: InvalidOrderTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_parameter_value.py b/foundry/v2/ontologies/errors/_invalid_parameter_value.py index 9b6b7106c..3c5049b87 100644 --- a/foundry/v2/ontologies/errors/_invalid_parameter_value.py +++ b/foundry/v2/ontologies/errors/_invalid_parameter_value.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._data_value import DataValue from foundry.v2.ontologies.models._ontology_data_type import OntologyDataType from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -47,7 +46,7 @@ class InvalidParameterValueParameters(TypedDict): @dataclass -class InvalidParameterValue(PalantirRPCException): +class InvalidParameterValue(BadRequestError): name: Literal["InvalidParameterValue"] parameters: InvalidParameterValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_property_filter_value.py b/foundry/v2/ontologies/errors/_invalid_property_filter_value.py index 8d971737c..fffe1f84c 100644 --- a/foundry/v2/ontologies/errors/_invalid_property_filter_value.py +++ b/foundry/v2/ontologies/errors/_invalid_property_filter_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._filter_value import FilterValue from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_filter import PropertyFilter @@ -46,7 +45,7 @@ class InvalidPropertyFilterValueParameters(TypedDict): @dataclass -class InvalidPropertyFilterValue(PalantirRPCException): +class InvalidPropertyFilterValue(BadRequestError): name: Literal["InvalidPropertyFilterValue"] parameters: InvalidPropertyFilterValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_property_filters_combination.py b/foundry/v2/ontologies/errors/_invalid_property_filters_combination.py index 1284b7dfe..98dd9d82f 100644 --- a/foundry/v2/ontologies/errors/_invalid_property_filters_combination.py +++ b/foundry/v2/ontologies/errors/_invalid_property_filters_combination.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_filter import PropertyFilter @@ -38,7 +37,7 @@ class InvalidPropertyFiltersCombinationParameters(TypedDict): @dataclass -class InvalidPropertyFiltersCombination(PalantirRPCException): +class InvalidPropertyFiltersCombination(BadRequestError): name: Literal["InvalidPropertyFiltersCombination"] parameters: InvalidPropertyFiltersCombinationParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_property_type.py b/foundry/v2/ontologies/errors/_invalid_property_type.py index 064b80593..0b2507b66 100644 --- a/foundry/v2/ontologies/errors/_invalid_property_type.py +++ b/foundry/v2/ontologies/errors/_invalid_property_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._value_type import ValueType @@ -37,7 +36,7 @@ class InvalidPropertyTypeParameters(TypedDict): @dataclass -class InvalidPropertyType(PalantirRPCException): +class InvalidPropertyType(BadRequestError): name: Literal["InvalidPropertyType"] parameters: InvalidPropertyTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_property_value.py b/foundry/v2/ontologies/errors/_invalid_property_value.py index 7214a4453..65ef77a00 100644 --- a/foundry/v2/ontologies/errors/_invalid_property_value.py +++ b/foundry/v2/ontologies/errors/_invalid_property_value.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_value import PropertyValue from foundry.v2.ontologies.models._value_type import ValueType @@ -43,7 +42,7 @@ class InvalidPropertyValueParameters(TypedDict): @dataclass -class InvalidPropertyValue(PalantirRPCException): +class InvalidPropertyValue(BadRequestError): name: Literal["InvalidPropertyValue"] parameters: InvalidPropertyValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_query_parameter_value.py b/foundry/v2/ontologies/errors/_invalid_query_parameter_value.py index d6caede0a..63598479b 100644 --- a/foundry/v2/ontologies/errors/_invalid_query_parameter_value.py +++ b/foundry/v2/ontologies/errors/_invalid_query_parameter_value.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._data_value import DataValue from foundry.v2.ontologies.models._parameter_id import ParameterId from foundry.v2.ontologies.models._query_data_type_dict import QueryDataTypeDict @@ -44,7 +43,7 @@ class InvalidQueryParameterValueParameters(TypedDict): @dataclass -class InvalidQueryParameterValue(PalantirRPCException): +class InvalidQueryParameterValue(BadRequestError): name: Literal["InvalidQueryParameterValue"] parameters: InvalidQueryParameterValueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_range_query.py b/foundry/v2/ontologies/errors/_invalid_range_query.py index e06ccfca8..b946ed858 100644 --- a/foundry/v2/ontologies/errors/_invalid_range_query.py +++ b/foundry/v2/ontologies/errors/_invalid_range_query.py @@ -19,11 +19,10 @@ from typing import Any from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidRangeQueryParameters(TypedDict): @@ -33,21 +32,17 @@ class InvalidRangeQueryParameters(TypedDict): lt: NotRequired[Any] """Less than""" - gt: NotRequired[Any] """Greater than""" - lte: NotRequired[Any] """Less than or equal""" - gte: NotRequired[Any] """Greater than or equal""" - field: str @dataclass -class InvalidRangeQuery(PalantirRPCException): +class InvalidRangeQuery(BadRequestError): name: Literal["InvalidRangeQuery"] parameters: InvalidRangeQueryParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_sort_order.py b/foundry/v2/ontologies/errors/_invalid_sort_order.py index 0fcbaa41d..ed837d289 100644 --- a/foundry/v2/ontologies/errors/_invalid_sort_order.py +++ b/foundry/v2/ontologies/errors/_invalid_sort_order.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidSortOrderParameters(TypedDict): @@ -36,7 +35,7 @@ class InvalidSortOrderParameters(TypedDict): @dataclass -class InvalidSortOrder(PalantirRPCException): +class InvalidSortOrder(BadRequestError): name: Literal["InvalidSortOrder"] parameters: InvalidSortOrderParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_sort_type.py b/foundry/v2/ontologies/errors/_invalid_sort_type.py index fc63bb8ac..df2507052 100644 --- a/foundry/v2/ontologies/errors/_invalid_sort_type.py +++ b/foundry/v2/ontologies/errors/_invalid_sort_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidSortTypeParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidSortTypeParameters(TypedDict): @dataclass -class InvalidSortType(PalantirRPCException): +class InvalidSortType(BadRequestError): name: Literal["InvalidSortType"] parameters: InvalidSortTypeParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_invalid_user_id.py b/foundry/v2/ontologies/errors/_invalid_user_id.py index 385e36153..ea9d5a46a 100644 --- a/foundry/v2/ontologies/errors/_invalid_user_id.py +++ b/foundry/v2/ontologies/errors/_invalid_user_id.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidUserIdParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidUserIdParameters(TypedDict): @dataclass -class InvalidUserId(PalantirRPCException): +class InvalidUserId(BadRequestError): name: Literal["InvalidUserId"] parameters: InvalidUserIdParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_link_already_exists.py b/foundry/v2/ontologies/errors/_link_already_exists.py index 57100cdd8..2ffd723fd 100644 --- a/foundry/v2/ontologies/errors/_link_already_exists.py +++ b/foundry/v2/ontologies/errors/_link_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class LinkAlreadyExistsParameters(TypedDict): @@ -31,7 +30,7 @@ class LinkAlreadyExistsParameters(TypedDict): @dataclass -class LinkAlreadyExists(PalantirRPCException): +class LinkAlreadyExists(ConflictError): name: Literal["LinkAlreadyExists"] parameters: LinkAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_link_type_not_found.py b/foundry/v2/ontologies/errors/_link_type_not_found.py index 4e57cb9cb..5de717c29 100644 --- a/foundry/v2/ontologies/errors/_link_type_not_found.py +++ b/foundry/v2/ontologies/errors/_link_type_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class LinkTypeNotFoundParameters(TypedDict): @dataclass -class LinkTypeNotFound(PalantirRPCException): +class LinkTypeNotFound(NotFoundError): name: Literal["LinkTypeNotFound"] parameters: LinkTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_linked_object_not_found.py b/foundry/v2/ontologies/errors/_linked_object_not_found.py index aba0dc664..2334a0118 100644 --- a/foundry/v2/ontologies/errors/_linked_object_not_found.py +++ b/foundry/v2/ontologies/errors/_linked_object_not_found.py @@ -19,10 +19,9 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._primary_key_value import PrimaryKeyValue @@ -42,7 +41,7 @@ class LinkedObjectNotFoundParameters(TypedDict): @dataclass -class LinkedObjectNotFound(PalantirRPCException): +class LinkedObjectNotFound(NotFoundError): name: Literal["LinkedObjectNotFound"] parameters: LinkedObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_malformed_property_filters.py b/foundry/v2/ontologies/errors/_malformed_property_filters.py index 3ef917c83..65cded870 100644 --- a/foundry/v2/ontologies/errors/_malformed_property_filters.py +++ b/foundry/v2/ontologies/errors/_malformed_property_filters.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MalformedPropertyFiltersParameters(TypedDict): @@ -33,7 +32,7 @@ class MalformedPropertyFiltersParameters(TypedDict): @dataclass -class MalformedPropertyFilters(PalantirRPCException): +class MalformedPropertyFilters(BadRequestError): name: Literal["MalformedPropertyFilters"] parameters: MalformedPropertyFiltersParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_marketplace_action_mapping_not_found.py b/foundry/v2/ontologies/errors/_marketplace_action_mapping_not_found.py index a5981562b..5fac0cbae 100644 --- a/foundry/v2/ontologies/errors/_marketplace_action_mapping_not_found.py +++ b/foundry/v2/ontologies/errors/_marketplace_action_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v2.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v2.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceActionMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceActionMappingNotFound(PalantirRPCException): +class MarketplaceActionMappingNotFound(NotFoundError): name: Literal["MarketplaceActionMappingNotFound"] parameters: MarketplaceActionMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_marketplace_installation_not_found.py b/foundry/v2/ontologies/errors/_marketplace_installation_not_found.py index 2c9cf713f..c28863462 100644 --- a/foundry/v2/ontologies/errors/_marketplace_installation_not_found.py +++ b/foundry/v2/ontologies/errors/_marketplace_installation_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v2.ontologies.models._sdk_package_name import SdkPackageName @@ -37,7 +36,7 @@ class MarketplaceInstallationNotFoundParameters(TypedDict): @dataclass -class MarketplaceInstallationNotFound(PalantirRPCException): +class MarketplaceInstallationNotFound(NotFoundError): name: Literal["MarketplaceInstallationNotFound"] parameters: MarketplaceInstallationNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_marketplace_link_mapping_not_found.py b/foundry/v2/ontologies/errors/_marketplace_link_mapping_not_found.py index 80e57cec6..1dc595b8b 100644 --- a/foundry/v2/ontologies/errors/_marketplace_link_mapping_not_found.py +++ b/foundry/v2/ontologies/errors/_marketplace_link_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v2.ontologies.models._link_type_api_name import LinkTypeApiName from foundry.v2.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceLinkMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceLinkMappingNotFound(PalantirRPCException): +class MarketplaceLinkMappingNotFound(NotFoundError): name: Literal["MarketplaceLinkMappingNotFound"] parameters: MarketplaceLinkMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_marketplace_object_mapping_not_found.py b/foundry/v2/ontologies/errors/_marketplace_object_mapping_not_found.py index 382435244..ce31ef9fb 100644 --- a/foundry/v2/ontologies/errors/_marketplace_object_mapping_not_found.py +++ b/foundry/v2/ontologies/errors/_marketplace_object_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceObjectMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceObjectMappingNotFound(PalantirRPCException): +class MarketplaceObjectMappingNotFound(NotFoundError): name: Literal["MarketplaceObjectMappingNotFound"] parameters: MarketplaceObjectMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_marketplace_query_mapping_not_found.py b/foundry/v2/ontologies/errors/_marketplace_query_mapping_not_found.py index dcb1aabdf..22f707786 100644 --- a/foundry/v2/ontologies/errors/_marketplace_query_mapping_not_found.py +++ b/foundry/v2/ontologies/errors/_marketplace_query_mapping_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._artifact_repository_rid import ArtifactRepositoryRid from foundry.v2.ontologies.models._query_api_name import QueryApiName from foundry.v2.ontologies.models._sdk_package_name import SdkPackageName @@ -40,7 +39,7 @@ class MarketplaceQueryMappingNotFoundParameters(TypedDict): @dataclass -class MarketplaceQueryMappingNotFound(PalantirRPCException): +class MarketplaceQueryMappingNotFound(NotFoundError): name: Literal["MarketplaceQueryMappingNotFound"] parameters: MarketplaceQueryMappingNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_missing_parameter.py b/foundry/v2/ontologies/errors/_missing_parameter.py index ba82a27ec..c8c0e8a83 100644 --- a/foundry/v2/ontologies/errors/_missing_parameter.py +++ b/foundry/v2/ontologies/errors/_missing_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -38,7 +37,7 @@ class MissingParameterParameters(TypedDict): @dataclass -class MissingParameter(PalantirRPCException): +class MissingParameter(BadRequestError): name: Literal["MissingParameter"] parameters: MissingParameterParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_multiple_group_by_on_field_not_supported.py b/foundry/v2/ontologies/errors/_multiple_group_by_on_field_not_supported.py index d4b237044..7a1eebe33 100644 --- a/foundry/v2/ontologies/errors/_multiple_group_by_on_field_not_supported.py +++ b/foundry/v2/ontologies/errors/_multiple_group_by_on_field_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MultipleGroupByOnFieldNotSupportedParameters(TypedDict): @@ -34,7 +33,7 @@ class MultipleGroupByOnFieldNotSupportedParameters(TypedDict): @dataclass -class MultipleGroupByOnFieldNotSupported(PalantirRPCException): +class MultipleGroupByOnFieldNotSupported(BadRequestError): name: Literal["MultipleGroupByOnFieldNotSupported"] parameters: MultipleGroupByOnFieldNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_multiple_property_values_not_supported.py b/foundry/v2/ontologies/errors/_multiple_property_values_not_supported.py index 3959252bd..2e43ce173 100644 --- a/foundry/v2/ontologies/errors/_multiple_property_values_not_supported.py +++ b/foundry/v2/ontologies/errors/_multiple_property_values_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_filter import PropertyFilter @@ -40,7 +39,7 @@ class MultiplePropertyValuesNotSupportedParameters(TypedDict): @dataclass -class MultiplePropertyValuesNotSupported(PalantirRPCException): +class MultiplePropertyValuesNotSupported(BadRequestError): name: Literal["MultiplePropertyValuesNotSupported"] parameters: MultiplePropertyValuesNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_already_exists.py b/foundry/v2/ontologies/errors/_object_already_exists.py index e0c458043..17694bd5e 100644 --- a/foundry/v2/ontologies/errors/_object_already_exists.py +++ b/foundry/v2/ontologies/errors/_object_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ObjectAlreadyExistsParameters(TypedDict): @@ -31,7 +30,7 @@ class ObjectAlreadyExistsParameters(TypedDict): @dataclass -class ObjectAlreadyExists(PalantirRPCException): +class ObjectAlreadyExists(ConflictError): name: Literal["ObjectAlreadyExists"] parameters: ObjectAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_changed.py b/foundry/v2/ontologies/errors/_object_changed.py index 8beb13d05..2dff4b34a 100644 --- a/foundry/v2/ontologies/errors/_object_changed.py +++ b/foundry/v2/ontologies/errors/_object_changed.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError class ObjectChangedParameters(TypedDict): @@ -31,7 +30,7 @@ class ObjectChangedParameters(TypedDict): @dataclass -class ObjectChanged(PalantirRPCException): +class ObjectChanged(ConflictError): name: Literal["ObjectChanged"] parameters: ObjectChangedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_not_found.py b/foundry/v2/ontologies/errors/_object_not_found.py index f9dc85020..95734ef33 100644 --- a/foundry/v2/ontologies/errors/_object_not_found.py +++ b/foundry/v2/ontologies/errors/_object_not_found.py @@ -19,11 +19,10 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._primary_key_value import PrimaryKeyValue from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -40,7 +39,7 @@ class ObjectNotFoundParameters(TypedDict): @dataclass -class ObjectNotFound(PalantirRPCException): +class ObjectNotFound(NotFoundError): name: Literal["ObjectNotFound"] parameters: ObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_set_not_found.py b/foundry/v2/ontologies/errors/_object_set_not_found.py index dd6706937..2f7dfa306 100644 --- a/foundry/v2/ontologies/errors/_object_set_not_found.py +++ b/foundry/v2/ontologies/errors/_object_set_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_set_rid import ObjectSetRid @@ -34,7 +33,7 @@ class ObjectSetNotFoundParameters(TypedDict): @dataclass -class ObjectSetNotFound(PalantirRPCException): +class ObjectSetNotFound(NotFoundError): name: Literal["ObjectSetNotFound"] parameters: ObjectSetNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_type_not_found.py b/foundry/v2/ontologies/errors/_object_type_not_found.py index a2000140f..ad5a9fd8a 100644 --- a/foundry/v2/ontologies/errors/_object_type_not_found.py +++ b/foundry/v2/ontologies/errors/_object_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._object_type_rid import ObjectTypeRid @@ -38,7 +37,7 @@ class ObjectTypeNotFoundParameters(TypedDict): @dataclass -class ObjectTypeNotFound(PalantirRPCException): +class ObjectTypeNotFound(NotFoundError): name: Literal["ObjectTypeNotFound"] parameters: ObjectTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_type_not_synced.py b/foundry/v2/ontologies/errors/_object_type_not_synced.py index 8f68559dd..b2f28d216 100644 --- a/foundry/v2/ontologies/errors/_object_type_not_synced.py +++ b/foundry/v2/ontologies/errors/_object_type_not_synced.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class ObjectTypeNotSyncedParameters(TypedDict): @dataclass -class ObjectTypeNotSynced(PalantirRPCException): +class ObjectTypeNotSynced(ConflictError): name: Literal["ObjectTypeNotSynced"] parameters: ObjectTypeNotSyncedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_object_types_not_synced.py b/foundry/v2/ontologies/errors/_object_types_not_synced.py index 99b0f4ae5..990b93dfb 100644 --- a/foundry/v2/ontologies/errors/_object_types_not_synced.py +++ b/foundry/v2/ontologies/errors/_object_types_not_synced.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -38,7 +37,7 @@ class ObjectTypesNotSyncedParameters(TypedDict): @dataclass -class ObjectTypesNotSynced(PalantirRPCException): +class ObjectTypesNotSynced(ConflictError): name: Literal["ObjectTypesNotSynced"] parameters: ObjectTypesNotSyncedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_objects_exceeded_limit.py b/foundry/v2/ontologies/errors/_objects_exceeded_limit.py index 17c2bf01a..5a1988db9 100644 --- a/foundry/v2/ontologies/errors/_objects_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_objects_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class ObjectsExceededLimitParameters(TypedDict): @@ -34,7 +33,7 @@ class ObjectsExceededLimitParameters(TypedDict): @dataclass -class ObjectsExceededLimit(PalantirRPCException): +class ObjectsExceededLimit(BadRequestError): name: Literal["ObjectsExceededLimit"] parameters: ObjectsExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_ontology_api_name_not_unique.py b/foundry/v2/ontologies/errors/_ontology_api_name_not_unique.py index 8cb88e4c9..40c452e91 100644 --- a/foundry/v2/ontologies/errors/_ontology_api_name_not_unique.py +++ b/foundry/v2/ontologies/errors/_ontology_api_name_not_unique.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._ontology_api_name import OntologyApiName @@ -34,7 +33,7 @@ class OntologyApiNameNotUniqueParameters(TypedDict): @dataclass -class OntologyApiNameNotUnique(PalantirRPCException): +class OntologyApiNameNotUnique(BadRequestError): name: Literal["OntologyApiNameNotUnique"] parameters: OntologyApiNameNotUniqueParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_ontology_edits_exceeded_limit.py b/foundry/v2/ontologies/errors/_ontology_edits_exceeded_limit.py index c57ae7d62..83c0dab3d 100644 --- a/foundry/v2/ontologies/errors/_ontology_edits_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_ontology_edits_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class OntologyEditsExceededLimitParameters(TypedDict): @@ -39,7 +38,7 @@ class OntologyEditsExceededLimitParameters(TypedDict): @dataclass -class OntologyEditsExceededLimit(PalantirRPCException): +class OntologyEditsExceededLimit(BadRequestError): name: Literal["OntologyEditsExceededLimit"] parameters: OntologyEditsExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_ontology_not_found.py b/foundry/v2/ontologies/errors/_ontology_not_found.py index 41de68831..591c01edf 100644 --- a/foundry/v2/ontologies/errors/_ontology_not_found.py +++ b/foundry/v2/ontologies/errors/_ontology_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._ontology_api_name import OntologyApiName from foundry.v2.ontologies.models._ontology_rid import OntologyRid @@ -38,7 +37,7 @@ class OntologyNotFoundParameters(TypedDict): @dataclass -class OntologyNotFound(PalantirRPCException): +class OntologyNotFound(NotFoundError): name: Literal["OntologyNotFound"] parameters: OntologyNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_ontology_syncing.py b/foundry/v2/ontologies/errors/_ontology_syncing.py index eef5227bf..0e4f59514 100644 --- a/foundry/v2/ontologies/errors/_ontology_syncing.py +++ b/foundry/v2/ontologies/errors/_ontology_syncing.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class OntologySyncingParameters(TypedDict): @dataclass -class OntologySyncing(PalantirRPCException): +class OntologySyncing(ConflictError): name: Literal["OntologySyncing"] parameters: OntologySyncingParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_ontology_syncing_object_types.py b/foundry/v2/ontologies/errors/_ontology_syncing_object_types.py index b57ddffa9..ccae83473 100644 --- a/foundry/v2/ontologies/errors/_ontology_syncing_object_types.py +++ b/foundry/v2/ontologies/errors/_ontology_syncing_object_types.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -38,7 +37,7 @@ class OntologySyncingObjectTypesParameters(TypedDict): @dataclass -class OntologySyncingObjectTypes(PalantirRPCException): +class OntologySyncingObjectTypes(ConflictError): name: Literal["OntologySyncingObjectTypes"] parameters: OntologySyncingObjectTypesParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_parameter_object_not_found.py b/foundry/v2/ontologies/errors/_parameter_object_not_found.py index 141f6f003..1117596fe 100644 --- a/foundry/v2/ontologies/errors/_parameter_object_not_found.py +++ b/foundry/v2/ontologies/errors/_parameter_object_not_found.py @@ -19,10 +19,9 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._primary_key_value import PrimaryKeyValue from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class ParameterObjectNotFoundParameters(TypedDict): @dataclass -class ParameterObjectNotFound(PalantirRPCException): +class ParameterObjectNotFound(NotFoundError): name: Literal["ParameterObjectNotFound"] parameters: ParameterObjectNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_parameter_object_set_rid_not_found.py b/foundry/v2/ontologies/errors/_parameter_object_set_rid_not_found.py index 94bb6f28b..b358e2eec 100644 --- a/foundry/v2/ontologies/errors/_parameter_object_set_rid_not_found.py +++ b/foundry/v2/ontologies/errors/_parameter_object_set_rid_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError class ParameterObjectSetRidNotFoundParameters(TypedDict): @@ -34,7 +33,7 @@ class ParameterObjectSetRidNotFoundParameters(TypedDict): @dataclass -class ParameterObjectSetRidNotFound(PalantirRPCException): +class ParameterObjectSetRidNotFound(NotFoundError): name: Literal["ParameterObjectSetRidNotFound"] parameters: ParameterObjectSetRidNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_parameter_type_not_supported.py b/foundry/v2/ontologies/errors/_parameter_type_not_supported.py index 501f6da78..3bcd1f972 100644 --- a/foundry/v2/ontologies/errors/_parameter_type_not_supported.py +++ b/foundry/v2/ontologies/errors/_parameter_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._parameter_id import ParameterId from foundry.v2.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class ParameterTypeNotSupportedParameters(TypedDict): @dataclass -class ParameterTypeNotSupported(PalantirRPCException): +class ParameterTypeNotSupported(BadRequestError): name: Literal["ParameterTypeNotSupported"] parameters: ParameterTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_parameters_not_found.py b/foundry/v2/ontologies/errors/_parameters_not_found.py index 69a430b36..fba526bae 100644 --- a/foundry/v2/ontologies/errors/_parameters_not_found.py +++ b/foundry/v2/ontologies/errors/_parameters_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._action_type_api_name import ActionTypeApiName from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -43,7 +42,7 @@ class ParametersNotFoundParameters(TypedDict): @dataclass -class ParametersNotFound(PalantirRPCException): +class ParametersNotFound(BadRequestError): name: Literal["ParametersNotFound"] parameters: ParametersNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_parent_attachment_permission_denied.py b/foundry/v2/ontologies/errors/_parent_attachment_permission_denied.py index ea7e08589..8abb782f6 100644 --- a/foundry/v2/ontologies/errors/_parent_attachment_permission_denied.py +++ b/foundry/v2/ontologies/errors/_parent_attachment_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class ParentAttachmentPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class ParentAttachmentPermissionDeniedParameters(TypedDict): @dataclass -class ParentAttachmentPermissionDenied(PalantirRPCException): +class ParentAttachmentPermissionDenied(PermissionDeniedError): name: Literal["ParentAttachmentPermissionDenied"] parameters: ParentAttachmentPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_properties_have_different_ids.py b/foundry/v2/ontologies/errors/_properties_have_different_ids.py index 4ac8397b8..50481e204 100644 --- a/foundry/v2/ontologies/errors/_properties_have_different_ids.py +++ b/foundry/v2/ontologies/errors/_properties_have_different_ids.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, ) # NOQA @@ -37,7 +36,7 @@ class PropertiesHaveDifferentIdsParameters(TypedDict): @dataclass -class PropertiesHaveDifferentIds(PalantirRPCException): +class PropertiesHaveDifferentIds(BadRequestError): name: Literal["PropertiesHaveDifferentIds"] parameters: PropertiesHaveDifferentIdsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_properties_not_filterable.py b/foundry/v2/ontologies/errors/_properties_not_filterable.py index b837ab569..1c39cb3c1 100644 --- a/foundry/v2/ontologies/errors/_properties_not_filterable.py +++ b/foundry/v2/ontologies/errors/_properties_not_filterable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotFilterableParameters(TypedDict): @dataclass -class PropertiesNotFilterable(PalantirRPCException): +class PropertiesNotFilterable(BadRequestError): name: Literal["PropertiesNotFilterable"] parameters: PropertiesNotFilterableParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_properties_not_found.py b/foundry/v2/ontologies/errors/_properties_not_found.py index 38fc6cd32..25562d55b 100644 --- a/foundry/v2/ontologies/errors/_properties_not_found.py +++ b/foundry/v2/ontologies/errors/_properties_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -38,7 +37,7 @@ class PropertiesNotFoundParameters(TypedDict): @dataclass -class PropertiesNotFound(PalantirRPCException): +class PropertiesNotFound(NotFoundError): name: Literal["PropertiesNotFound"] parameters: PropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_properties_not_searchable.py b/foundry/v2/ontologies/errors/_properties_not_searchable.py index 2182fd8f1..e2834befb 100644 --- a/foundry/v2/ontologies/errors/_properties_not_searchable.py +++ b/foundry/v2/ontologies/errors/_properties_not_searchable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotSearchableParameters(TypedDict): @dataclass -class PropertiesNotSearchable(PalantirRPCException): +class PropertiesNotSearchable(BadRequestError): name: Literal["PropertiesNotSearchable"] parameters: PropertiesNotSearchableParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_properties_not_sortable.py b/foundry/v2/ontologies/errors/_properties_not_sortable.py index af0d596a7..4c191feb3 100644 --- a/foundry/v2/ontologies/errors/_properties_not_sortable.py +++ b/foundry/v2/ontologies/errors/_properties_not_sortable.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -39,7 +38,7 @@ class PropertiesNotSortableParameters(TypedDict): @dataclass -class PropertiesNotSortable(PalantirRPCException): +class PropertiesNotSortable(BadRequestError): name: Literal["PropertiesNotSortable"] parameters: PropertiesNotSortableParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_api_name_not_found.py b/foundry/v2/ontologies/errors/_property_api_name_not_found.py index 6b1516f3d..ff77779e5 100644 --- a/foundry/v2/ontologies/errors/_property_api_name_not_found.py +++ b/foundry/v2/ontologies/errors/_property_api_name_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_id import PropertyId from foundry.v2.ontologies.models._value_type import ValueType @@ -40,7 +39,7 @@ class PropertyApiNameNotFoundParameters(TypedDict): @dataclass -class PropertyApiNameNotFound(PalantirRPCException): +class PropertyApiNameNotFound(BadRequestError): name: Literal["PropertyApiNameNotFound"] parameters: PropertyApiNameNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_base_type_not_supported.py b/foundry/v2/ontologies/errors/_property_base_type_not_supported.py index a36697e5e..fe3b5a42c 100644 --- a/foundry/v2/ontologies/errors/_property_base_type_not_supported.py +++ b/foundry/v2/ontologies/errors/_property_base_type_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._value_type import ValueType @@ -43,7 +42,7 @@ class PropertyBaseTypeNotSupportedParameters(TypedDict): @dataclass -class PropertyBaseTypeNotSupported(PalantirRPCException): +class PropertyBaseTypeNotSupported(BadRequestError): name: Literal["PropertyBaseTypeNotSupported"] parameters: PropertyBaseTypeNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_filters_not_supported.py b/foundry/v2/ontologies/errors/_property_filters_not_supported.py index ecff9a120..02d571f4c 100644 --- a/foundry/v2/ontologies/errors/_property_filters_not_supported.py +++ b/foundry/v2/ontologies/errors/_property_filters_not_supported.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_filter import PropertyFilter @@ -41,7 +40,7 @@ class PropertyFiltersNotSupportedParameters(TypedDict): @dataclass -class PropertyFiltersNotSupported(PalantirRPCException): +class PropertyFiltersNotSupported(BadRequestError): name: Literal["PropertyFiltersNotSupported"] parameters: PropertyFiltersNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_not_found.py b/foundry/v2/ontologies/errors/_property_not_found.py index 17f0f6bc4..f1d361771 100644 --- a/foundry/v2/ontologies/errors/_property_not_found.py +++ b/foundry/v2/ontologies/errors/_property_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class PropertyNotFoundParameters(TypedDict): @@ -31,7 +30,7 @@ class PropertyNotFoundParameters(TypedDict): @dataclass -class PropertyNotFound(PalantirRPCException): +class PropertyNotFound(BadRequestError): name: Literal["PropertyNotFound"] parameters: PropertyNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py b/foundry/v2/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py index ca93f6ae0..a5b959618 100644 --- a/foundry/v2/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py +++ b/foundry/v2/ontologies/errors/_property_type_does_not_support_nearest_neighbors.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class PropertyTypeDoesNotSupportNearestNeighborsParameters(TypedDict): @@ -31,7 +30,7 @@ class PropertyTypeDoesNotSupportNearestNeighborsParameters(TypedDict): @dataclass -class PropertyTypeDoesNotSupportNearestNeighbors(PalantirRPCException): +class PropertyTypeDoesNotSupportNearestNeighbors(BadRequestError): name: Literal["PropertyTypeDoesNotSupportNearestNeighbors"] parameters: PropertyTypeDoesNotSupportNearestNeighborsParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_type_not_found.py b/foundry/v2/ontologies/errors/_property_type_not_found.py index 19959c34b..4d92ed906 100644 --- a/foundry/v2/ontologies/errors/_property_type_not_found.py +++ b/foundry/v2/ontologies/errors/_property_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._property_api_name import PropertyApiName @@ -38,7 +37,7 @@ class PropertyTypeNotFoundParameters(TypedDict): @dataclass -class PropertyTypeNotFound(PalantirRPCException): +class PropertyTypeNotFound(NotFoundError): name: Literal["PropertyTypeNotFound"] parameters: PropertyTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_property_types_search_not_supported.py b/foundry/v2/ontologies/errors/_property_types_search_not_supported.py index 3101b39be..06e69a93f 100644 --- a/foundry/v2/ontologies/errors/_property_types_search_not_supported.py +++ b/foundry/v2/ontologies/errors/_property_types_search_not_supported.py @@ -20,10 +20,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._property_api_name import PropertyApiName from foundry.v2.ontologies.models._property_filter import PropertyFilter @@ -40,7 +39,7 @@ class PropertyTypesSearchNotSupportedParameters(TypedDict): @dataclass -class PropertyTypesSearchNotSupported(PalantirRPCException): +class PropertyTypesSearchNotSupported(BadRequestError): name: Literal["PropertyTypesSearchNotSupported"] parameters: PropertyTypesSearchNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_query_encountered_user_facing_error.py b/foundry/v2/ontologies/errors/_query_encountered_user_facing_error.py index 66ebcfd20..adfae72be 100644 --- a/foundry/v2/ontologies/errors/_query_encountered_user_facing_error.py +++ b/foundry/v2/ontologies/errors/_query_encountered_user_facing_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -42,7 +41,7 @@ class QueryEncounteredUserFacingErrorParameters(TypedDict): @dataclass -class QueryEncounteredUserFacingError(PalantirRPCException): +class QueryEncounteredUserFacingError(ConflictError): name: Literal["QueryEncounteredUserFacingError"] parameters: QueryEncounteredUserFacingErrorParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_query_memory_exceeded_limit.py b/foundry/v2/ontologies/errors/_query_memory_exceeded_limit.py index 23ba37ef5..7873e35fb 100644 --- a/foundry/v2/ontologies/errors/_query_memory_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_query_memory_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryMemoryExceededLimitParameters(TypedDict): @dataclass -class QueryMemoryExceededLimit(PalantirRPCException): +class QueryMemoryExceededLimit(InternalServerError): name: Literal["QueryMemoryExceededLimit"] parameters: QueryMemoryExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_query_not_found.py b/foundry/v2/ontologies/errors/_query_not_found.py index a6d8224e6..7dc76f6b5 100644 --- a/foundry/v2/ontologies/errors/_query_not_found.py +++ b/foundry/v2/ontologies/errors/_query_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._query_api_name import QueryApiName @@ -34,7 +33,7 @@ class QueryNotFoundParameters(TypedDict): @dataclass -class QueryNotFound(PalantirRPCException): +class QueryNotFound(NotFoundError): name: Literal["QueryNotFound"] parameters: QueryNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_query_runtime_error.py b/foundry/v2/ontologies/errors/_query_runtime_error.py index 71c8a8b8e..8dae9b86e 100644 --- a/foundry/v2/ontologies/errors/_query_runtime_error.py +++ b/foundry/v2/ontologies/errors/_query_runtime_error.py @@ -19,11 +19,10 @@ from typing import Dict from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion from foundry.v2.ontologies.models._query_runtime_error_parameter import ( @@ -48,7 +47,7 @@ class QueryRuntimeErrorParameters(TypedDict): @dataclass -class QueryRuntimeError(PalantirRPCException): +class QueryRuntimeError(BadRequestError): name: Literal["QueryRuntimeError"] parameters: QueryRuntimeErrorParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_query_time_exceeded_limit.py b/foundry/v2/ontologies/errors/_query_time_exceeded_limit.py index 2879bd4bf..ce25921ab 100644 --- a/foundry/v2/ontologies/errors/_query_time_exceeded_limit.py +++ b/foundry/v2/ontologies/errors/_query_time_exceeded_limit.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError from foundry.v2.ontologies.models._function_rid import FunctionRid from foundry.v2.ontologies.models._function_version import FunctionVersion @@ -37,7 +36,7 @@ class QueryTimeExceededLimitParameters(TypedDict): @dataclass -class QueryTimeExceededLimit(PalantirRPCException): +class QueryTimeExceededLimit(InternalServerError): name: Literal["QueryTimeExceededLimit"] parameters: QueryTimeExceededLimitParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_search_vector_dimensions_differ.py b/foundry/v2/ontologies/errors/_search_vector_dimensions_differ.py index 5c83e7546..6b26ba183 100644 --- a/foundry/v2/ontologies/errors/_search_vector_dimensions_differ.py +++ b/foundry/v2/ontologies/errors/_search_vector_dimensions_differ.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class SearchVectorDimensionsDifferParameters(TypedDict): @@ -31,7 +30,7 @@ class SearchVectorDimensionsDifferParameters(TypedDict): @dataclass -class SearchVectorDimensionsDiffer(PalantirRPCException): +class SearchVectorDimensionsDiffer(BadRequestError): name: Literal["SearchVectorDimensionsDiffer"] parameters: SearchVectorDimensionsDifferParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_shared_properties_not_found.py b/foundry/v2/ontologies/errors/_shared_properties_not_found.py index 6764bbf7b..b3ec2da84 100644 --- a/foundry/v2/ontologies/errors/_shared_properties_not_found.py +++ b/foundry/v2/ontologies/errors/_shared_properties_not_found.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName from foundry.v2.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, @@ -40,7 +39,7 @@ class SharedPropertiesNotFoundParameters(TypedDict): @dataclass -class SharedPropertiesNotFound(PalantirRPCException): +class SharedPropertiesNotFound(NotFoundError): name: Literal["SharedPropertiesNotFound"] parameters: SharedPropertiesNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_shared_property_type_not_found.py b/foundry/v2/ontologies/errors/_shared_property_type_not_found.py index 3dc07e005..ad44d5ee3 100644 --- a/foundry/v2/ontologies/errors/_shared_property_type_not_found.py +++ b/foundry/v2/ontologies/errors/_shared_property_type_not_found.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.ontologies.models._shared_property_type_api_name import ( SharedPropertyTypeApiName, ) # NOQA @@ -40,7 +39,7 @@ class SharedPropertyTypeNotFoundParameters(TypedDict): @dataclass -class SharedPropertyTypeNotFound(PalantirRPCException): +class SharedPropertyTypeNotFound(NotFoundError): name: Literal["SharedPropertyTypeNotFound"] parameters: SharedPropertyTypeNotFoundParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_too_many_nearest_neighbors_requested.py b/foundry/v2/ontologies/errors/_too_many_nearest_neighbors_requested.py index 711d69962..3935dd3bc 100644 --- a/foundry/v2/ontologies/errors/_too_many_nearest_neighbors_requested.py +++ b/foundry/v2/ontologies/errors/_too_many_nearest_neighbors_requested.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class TooManyNearestNeighborsRequestedParameters(TypedDict): @@ -31,7 +30,7 @@ class TooManyNearestNeighborsRequestedParameters(TypedDict): @dataclass -class TooManyNearestNeighborsRequested(PalantirRPCException): +class TooManyNearestNeighborsRequested(BadRequestError): name: Literal["TooManyNearestNeighborsRequested"] parameters: TooManyNearestNeighborsRequestedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_unknown_parameter.py b/foundry/v2/ontologies/errors/_unknown_parameter.py index b9c0e6853..baabdf240 100644 --- a/foundry/v2/ontologies/errors/_unknown_parameter.py +++ b/foundry/v2/ontologies/errors/_unknown_parameter.py @@ -19,10 +19,9 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.ontologies.models._parameter_id import ParameterId @@ -40,7 +39,7 @@ class UnknownParameterParameters(TypedDict): @dataclass -class UnknownParameter(PalantirRPCException): +class UnknownParameter(BadRequestError): name: Literal["UnknownParameter"] parameters: UnknownParameterParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_unsupported_object_set.py b/foundry/v2/ontologies/errors/_unsupported_object_set.py index b472b0c63..2d6260bcb 100644 --- a/foundry/v2/ontologies/errors/_unsupported_object_set.py +++ b/foundry/v2/ontologies/errors/_unsupported_object_set.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class UnsupportedObjectSetParameters(TypedDict): @@ -31,7 +30,7 @@ class UnsupportedObjectSetParameters(TypedDict): @dataclass -class UnsupportedObjectSet(PalantirRPCException): +class UnsupportedObjectSet(BadRequestError): name: Literal["UnsupportedObjectSet"] parameters: UnsupportedObjectSetParameters error_instance_id: str diff --git a/foundry/v2/ontologies/errors/_view_object_permission_denied.py b/foundry/v2/ontologies/errors/_view_object_permission_denied.py index aaafad00e..bde88f16e 100644 --- a/foundry/v2/ontologies/errors/_view_object_permission_denied.py +++ b/foundry/v2/ontologies/errors/_view_object_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.ontologies.models._object_type_api_name import ObjectTypeApiName @@ -37,7 +36,7 @@ class ViewObjectPermissionDeniedParameters(TypedDict): @dataclass -class ViewObjectPermissionDenied(PalantirRPCException): +class ViewObjectPermissionDenied(PermissionDeniedError): name: Literal["ViewObjectPermissionDenied"] parameters: ViewObjectPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/ontologies/linked_object.py b/foundry/v2/ontologies/linked_object.py index 45d447a08..6b304dbeb 100644 --- a/foundry/v2/ontologies/linked_object.py +++ b/foundry/v2/ontologies/linked_object.py @@ -144,6 +144,7 @@ def get_linked_object( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -237,6 +238,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -336,6 +338,7 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -429,6 +432,7 @@ def get_linked_object( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -522,6 +526,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -621,6 +626,7 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -714,6 +720,7 @@ def get_linked_object( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -807,6 +814,7 @@ def list_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -906,5 +914,6 @@ def page_linked_objects( body_type=None, response_type=ListLinkedObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/models/__init__.py b/foundry/v2/ontologies/models/__init__.py index a111e18d8..29a33a175 100644 --- a/foundry/v2/ontologies/models/__init__.py +++ b/foundry/v2/ontologies/models/__init__.py @@ -608,12 +608,14 @@ QueryAggregationValueTypeDict, ) # NOQA from foundry.v2.ontologies.models._query_api_name import QueryApiName +from foundry.v2.ontologies.models._query_data_type import EntrySetType from foundry.v2.ontologies.models._query_data_type import QueryArrayType from foundry.v2.ontologies.models._query_data_type import QueryDataType from foundry.v2.ontologies.models._query_data_type import QuerySetType from foundry.v2.ontologies.models._query_data_type import QueryStructField from foundry.v2.ontologies.models._query_data_type import QueryStructType from foundry.v2.ontologies.models._query_data_type import QueryUnionType +from foundry.v2.ontologies.models._query_data_type_dict import EntrySetTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QueryArrayTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QueryDataTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QuerySetTypeDict @@ -923,6 +925,8 @@ "DoesNotIntersectPolygonQueryDict", "DoubleVector", "DoubleVectorDict", + "EntrySetType", + "EntrySetTypeDict", "EqualsQueryV2", "EqualsQueryV2Dict", "ExactDistinctAggregationV2", diff --git a/foundry/v2/ontologies/models/_data_value.py b/foundry/v2/ontologies/models/_data_value.py index b9a76367b..b8807cfec 100644 --- a/foundry/v2/ontologies/models/_data_value.py +++ b/foundry/v2/ontologies/models/_data_value.py @@ -29,8 +29,9 @@ | CipherText | string | `"CIPHER::ri.bellaso.main.cipher-channel.e414ab9e-b606-499a-a0e1-844fa296ba7e::unzjs3VifsTxuIpf1fH1CJ7OaPBr2bzMMdozPaZJtCii8vVG60yXIEmzoOJaEl9mfFFe::CIPHER"` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | -| Float | number | `3.14159265` | | Double | number | `3.14159265` | +| EntrySet | array of JSON objects | `[{"key": "EMP1234", "value": "true"}, {"key": "EMP4444", "value": "false"}]` | +| Float | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Marking | string | `"MU"` | diff --git a/foundry/v2/ontologies/models/_query_data_type.py b/foundry/v2/ontologies/models/_query_data_type.py index 881066caf..db6080a55 100644 --- a/foundry/v2/ontologies/models/_query_data_type.py +++ b/foundry/v2/ontologies/models/_query_data_type.py @@ -37,6 +37,7 @@ from foundry.v2.core.models._unsupported_type import UnsupportedType from foundry.v2.ontologies.models._ontology_object_set_type import OntologyObjectSetType from foundry.v2.ontologies.models._ontology_object_type import OntologyObjectType +from foundry.v2.ontologies.models._query_data_type_dict import EntrySetTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QueryArrayTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QuerySetTypeDict from foundry.v2.ontologies.models._query_data_type_dict import QueryStructFieldDict @@ -92,6 +93,22 @@ def to_dict(self) -> QuerySetTypeDict: return cast(QuerySetTypeDict, self.model_dump(by_alias=True, exclude_none=True)) +class EntrySetType(pydantic.BaseModel): + """EntrySetType""" + + key_type: QueryDataType = pydantic.Field(alias=str("keyType")) # type: ignore[literal-required] + + value_type: QueryDataType = pydantic.Field(alias=str("valueType")) # type: ignore[literal-required] + + type: Literal["entrySet"] = "entrySet" + + model_config = {"extra": "allow", "populate_by_name": True} + + def to_dict(self) -> EntrySetTypeDict: + """Return the dictionary representation of the model using the field aliases.""" + return cast(EntrySetTypeDict, self.model_dump(by_alias=True, exclude_none=True)) + + class QueryUnionType(pydantic.BaseModel): """QueryUnionType""" @@ -126,6 +143,7 @@ def to_dict(self) -> QueryArrayTypeDict: QueryStructType, QuerySetType, StringType, + EntrySetType, DoubleType, IntegerType, ThreeDimensionalAggregation, diff --git a/foundry/v2/ontologies/models/_query_data_type_dict.py b/foundry/v2/ontologies/models/_query_data_type_dict.py index e8f75404c..03495aae0 100644 --- a/foundry/v2/ontologies/models/_query_data_type_dict.py +++ b/foundry/v2/ontologies/models/_query_data_type_dict.py @@ -77,6 +77,18 @@ class QuerySetTypeDict(TypedDict): type: Literal["set"] +class EntrySetTypeDict(TypedDict): + """EntrySetType""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + keyType: QueryDataTypeDict + + valueType: QueryDataTypeDict + + type: Literal["entrySet"] + + class QueryUnionTypeDict(TypedDict): """QueryUnionType""" @@ -103,6 +115,7 @@ class QueryArrayTypeDict(TypedDict): QueryStructTypeDict, QuerySetTypeDict, StringTypeDict, + EntrySetTypeDict, DoubleTypeDict, IntegerTypeDict, ThreeDimensionalAggregationDict, diff --git a/foundry/v2/ontologies/object_type.py b/foundry/v2/ontologies/object_type.py index ccebc90e4..94c387bc7 100644 --- a/foundry/v2/ontologies/object_type.py +++ b/foundry/v2/ontologies/object_type.py @@ -109,6 +109,7 @@ def get( body_type=None, response_type=ObjectTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -158,6 +159,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSideV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -211,6 +213,7 @@ def list( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -265,6 +268,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -324,6 +328,7 @@ def page( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -384,6 +389,7 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -446,6 +452,7 @@ def get( body_type=None, response_type=ObjectTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -495,6 +502,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSideV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -548,6 +556,7 @@ def list( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -602,6 +611,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -661,6 +671,7 @@ def page( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -721,6 +732,7 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -783,6 +795,7 @@ def get( body_type=None, response_type=ObjectTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -832,6 +845,7 @@ def get_outgoing_link_type( body_type=None, response_type=LinkTypeSideV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -885,6 +899,7 @@ def list( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -939,6 +954,7 @@ def list_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -998,6 +1014,7 @@ def page( body_type=None, response_type=ListObjectTypesV2Response, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1058,5 +1075,6 @@ def page_outgoing_link_types( body_type=None, response_type=ListOutgoingLinkTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/ontology.py b/foundry/v2/ontologies/ontology.py index d78c94632..03e3d6e44 100644 --- a/foundry/v2/ontologies/ontology.py +++ b/foundry/v2/ontologies/ontology.py @@ -99,6 +99,7 @@ def get( body_type=None, response_type=OntologyV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -137,6 +138,7 @@ def get_full_metadata( body_type=None, response_type=OntologyFullMetadata, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -195,6 +197,7 @@ def get( body_type=None, response_type=OntologyV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -233,6 +236,7 @@ def get_full_metadata( body_type=None, response_type=OntologyFullMetadata, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -291,6 +295,7 @@ def get( body_type=None, response_type=OntologyV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -329,5 +334,6 @@ def get_full_metadata( body_type=None, response_type=OntologyFullMetadata, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/ontology_interface.py b/foundry/v2/ontologies/ontology_interface.py index 09115a489..780ab7e25 100644 --- a/foundry/v2/ontologies/ontology_interface.py +++ b/foundry/v2/ontologies/ontology_interface.py @@ -165,6 +165,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -219,6 +220,7 @@ def get( body_type=None, response_type=InterfaceType, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -280,6 +282,7 @@ def list( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -347,6 +350,7 @@ def page( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -450,6 +454,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -504,6 +509,7 @@ def get( body_type=None, response_type=InterfaceType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -565,6 +571,7 @@ def list( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -632,6 +639,7 @@ def page( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -735,6 +743,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -789,6 +798,7 @@ def get( body_type=None, response_type=InterfaceType, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -850,6 +860,7 @@ def list( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -917,5 +928,6 @@ def page( body_type=None, response_type=ListInterfaceTypesResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/ontology_object.py b/foundry/v2/ontologies/ontology_object.py index 89305ccdf..1f14cc90f 100644 --- a/foundry/v2/ontologies/ontology_object.py +++ b/foundry/v2/ontologies/ontology_object.py @@ -168,6 +168,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -221,6 +222,7 @@ def count( body_type=None, response_type=CountObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -286,6 +288,7 @@ def get( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -371,6 +374,7 @@ def list( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -462,6 +466,7 @@ def page( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -573,6 +578,7 @@ def search( ), response_type=SearchObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -670,6 +676,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -723,6 +730,7 @@ def count( body_type=None, response_type=CountObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -788,6 +796,7 @@ def get( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -873,6 +882,7 @@ def list( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -964,6 +974,7 @@ def page( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1075,6 +1086,7 @@ def search( ), response_type=SearchObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1172,6 +1184,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1225,6 +1238,7 @@ def count( body_type=None, response_type=CountObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1290,6 +1304,7 @@ def get( body_type=None, response_type=OntologyObjectV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1375,6 +1390,7 @@ def list( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1466,6 +1482,7 @@ def page( body_type=None, response_type=ListObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1577,5 +1594,6 @@ def search( ), response_type=SearchObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/ontology_object_set.py b/foundry/v2/ontologies/ontology_object_set.py index f2462e3b8..cbfa3eb63 100644 --- a/foundry/v2/ontologies/ontology_object_set.py +++ b/foundry/v2/ontologies/ontology_object_set.py @@ -159,6 +159,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -211,6 +212,7 @@ def create_temporary( ), response_type=CreateTemporaryObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -255,6 +257,7 @@ def get( body_type=None, response_type=ObjectSet, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -345,6 +348,7 @@ def load( ), response_type=LoadObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -438,6 +442,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -490,6 +495,7 @@ def create_temporary( ), response_type=CreateTemporaryObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -534,6 +540,7 @@ def get( body_type=None, response_type=ObjectSet, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -624,6 +631,7 @@ def load( ), response_type=LoadObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -717,6 +725,7 @@ def aggregate( ), response_type=AggregateObjectsResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -769,6 +778,7 @@ def create_temporary( ), response_type=CreateTemporaryObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -813,6 +823,7 @@ def get( body_type=None, response_type=ObjectSet, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -903,5 +914,6 @@ def load( ), response_type=LoadObjectSetResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/query.py b/foundry/v2/ontologies/query.py index 128a01886..9da1e702f 100644 --- a/foundry/v2/ontologies/query.py +++ b/foundry/v2/ontologies/query.py @@ -125,6 +125,7 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -210,6 +211,7 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -295,5 +297,6 @@ def execute( ), response_type=ExecuteQueryResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/query_type.py b/foundry/v2/ontologies/query_type.py index 429c55d47..68bcf1042 100644 --- a/foundry/v2/ontologies/query_type.py +++ b/foundry/v2/ontologies/query_type.py @@ -104,6 +104,7 @@ def get( body_type=None, response_type=QueryTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -156,6 +157,7 @@ def list( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -214,6 +216,7 @@ def page( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -276,6 +279,7 @@ def get( body_type=None, response_type=QueryTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -328,6 +332,7 @@ def list( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -386,6 +391,7 @@ def page( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -448,6 +454,7 @@ def get( body_type=None, response_type=QueryTypeV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -500,6 +507,7 @@ def list( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -558,5 +566,6 @@ def page( body_type=None, response_type=ListQueryTypesResponseV2, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/ontologies/time_series_property_v2.py b/foundry/v2/ontologies/time_series_property_v2.py index 909bc1d7a..37310b7a7 100644 --- a/foundry/v2/ontologies/time_series_property_v2.py +++ b/foundry/v2/ontologies/time_series_property_v2.py @@ -133,6 +133,7 @@ def get_first_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -195,6 +196,7 @@ def get_last_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -437,6 +439,7 @@ def stream_points( stream=stream, chunk_size=chunk_size, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -517,6 +520,7 @@ def get_first_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -579,6 +583,7 @@ def get_last_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -656,6 +661,7 @@ def stream_points( ), response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -736,6 +742,7 @@ def get_first_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -798,6 +805,7 @@ def get_last_point( body_type=None, response_type=TimeSeriesPoint, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -875,5 +883,6 @@ def stream_points( ), response_type=bytes, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/orchestration/build.py b/foundry/v2/orchestration/build.py index 70417291e..0cd68f965 100644 --- a/foundry/v2/orchestration/build.py +++ b/foundry/v2/orchestration/build.py @@ -38,6 +38,7 @@ from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode from foundry.v2.datasets.models._branch_name import BranchName +from foundry.v2.orchestration import errors as orchestration_errors from foundry.v2.orchestration.models._abort_on_failure import AbortOnFailure from foundry.v2.orchestration.models._build import Build from foundry.v2.orchestration.models._build_rid import BuildRid @@ -113,6 +114,8 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises CancelBuildPermissionDenied: Could not cancel the Build. """ return self._api_client.call_api( @@ -130,6 +133,9 @@ def cancel( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, + }, ), ).decode() @@ -176,6 +182,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Build + + :raises CreateBuildsPermissionDenied: Could not create the Build. """ return self._api_client.call_api( @@ -217,6 +225,9 @@ def create( ), response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "CreateBuildsPermissionDenied": orchestration_errors.CreateBuildsPermissionDenied, + }, ), ).decode() @@ -240,6 +251,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Build + + :raises BuildNotFound: The given Build could not be found. """ return self._api_client.call_api( @@ -259,6 +272,9 @@ def get( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "BuildNotFound": orchestration_errors.BuildNotFound, + }, ), ).decode() @@ -307,6 +323,7 @@ def get_batch( ], response_type=GetBuildsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -339,6 +356,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: SearchBuildsResponse + + :raises SearchBuildsPermissionDenied: Could not search the Build. """ return self._api_client.call_api( @@ -370,6 +389,9 @@ def search( ), response_type=SearchBuildsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, + }, ), ).decode() @@ -412,6 +434,8 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises CancelBuildPermissionDenied: Could not cancel the Build. """ return self._api_client.call_api( @@ -429,6 +453,9 @@ def cancel( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, + }, ), ) @@ -475,6 +502,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Build] + + :raises CreateBuildsPermissionDenied: Could not create the Build. """ return self._api_client.call_api( @@ -516,6 +545,9 @@ def create( ), response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "CreateBuildsPermissionDenied": orchestration_errors.CreateBuildsPermissionDenied, + }, ), ) @@ -539,6 +571,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Build] + + :raises BuildNotFound: The given Build could not be found. """ return self._api_client.call_api( @@ -558,6 +592,9 @@ def get( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "BuildNotFound": orchestration_errors.BuildNotFound, + }, ), ) @@ -606,6 +643,7 @@ def get_batch( ], response_type=GetBuildsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -638,6 +676,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[SearchBuildsResponse] + + :raises SearchBuildsPermissionDenied: Could not search the Build. """ return self._api_client.call_api( @@ -669,6 +709,9 @@ def search( ), response_type=SearchBuildsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, + }, ), ) @@ -711,6 +754,8 @@ def cancel( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises CancelBuildPermissionDenied: Could not cancel the Build. """ return self._api_client.stream_api( @@ -728,6 +773,9 @@ def cancel( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "CancelBuildPermissionDenied": orchestration_errors.CancelBuildPermissionDenied, + }, ), ) @@ -774,6 +822,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Build] + + :raises CreateBuildsPermissionDenied: Could not create the Build. """ return self._api_client.stream_api( @@ -815,6 +865,9 @@ def create( ), response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "CreateBuildsPermissionDenied": orchestration_errors.CreateBuildsPermissionDenied, + }, ), ) @@ -838,6 +891,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Build] + + :raises BuildNotFound: The given Build could not be found. """ return self._api_client.stream_api( @@ -857,6 +912,9 @@ def get( body_type=None, response_type=Build, request_timeout=request_timeout, + throwable_errors={ + "BuildNotFound": orchestration_errors.BuildNotFound, + }, ), ) @@ -905,6 +963,7 @@ def get_batch( ], response_type=GetBuildsBatchResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -937,6 +996,8 @@ def search( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[SearchBuildsResponse] + + :raises SearchBuildsPermissionDenied: Could not search the Build. """ return self._api_client.stream_api( @@ -968,5 +1029,8 @@ def search( ), response_type=SearchBuildsResponse, request_timeout=request_timeout, + throwable_errors={ + "SearchBuildsPermissionDenied": orchestration_errors.SearchBuildsPermissionDenied, + }, ), ) diff --git a/foundry/v2/orchestration/errors/_build_inputs_not_found.py b/foundry/v2/orchestration/errors/_build_inputs_not_found.py index 4581878f9..137772054 100644 --- a/foundry/v2/orchestration/errors/_build_inputs_not_found.py +++ b/foundry/v2/orchestration/errors/_build_inputs_not_found.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError class BuildInputsNotFoundParameters(TypedDict): @@ -35,7 +34,7 @@ class BuildInputsNotFoundParameters(TypedDict): @dataclass -class BuildInputsNotFound(PalantirRPCException): +class BuildInputsNotFound(NotFoundError): name: Literal["BuildInputsNotFound"] parameters: BuildInputsNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_inputs_permission_denied.py b/foundry/v2/orchestration/errors/_build_inputs_permission_denied.py index b5c4259dc..061fb45ea 100644 --- a/foundry/v2/orchestration/errors/_build_inputs_permission_denied.py +++ b/foundry/v2/orchestration/errors/_build_inputs_permission_denied.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class BuildInputsPermissionDeniedParameters(TypedDict): @@ -35,7 +34,7 @@ class BuildInputsPermissionDeniedParameters(TypedDict): @dataclass -class BuildInputsPermissionDenied(PalantirRPCException): +class BuildInputsPermissionDenied(PermissionDeniedError): name: Literal["BuildInputsPermissionDenied"] parameters: BuildInputsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_not_found.py b/foundry/v2/orchestration/errors/_build_not_found.py index 4d70789ff..6307e1f2f 100644 --- a/foundry/v2/orchestration/errors/_build_not_found.py +++ b/foundry/v2/orchestration/errors/_build_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.orchestration.models._build_rid import BuildRid @@ -35,7 +34,7 @@ class BuildNotFoundParameters(TypedDict): @dataclass -class BuildNotFound(PalantirRPCException): +class BuildNotFound(NotFoundError): name: Literal["BuildNotFound"] parameters: BuildNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_targets_missing_job_specs.py b/foundry/v2/orchestration/errors/_build_targets_missing_job_specs.py index e8c242adc..876e874c2 100644 --- a/foundry/v2/orchestration/errors/_build_targets_missing_job_specs.py +++ b/foundry/v2/orchestration/errors/_build_targets_missing_job_specs.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class BuildTargetsMissingJobSpecsParameters(TypedDict): @@ -35,7 +34,7 @@ class BuildTargetsMissingJobSpecsParameters(TypedDict): @dataclass -class BuildTargetsMissingJobSpecs(PalantirRPCException): +class BuildTargetsMissingJobSpecs(BadRequestError): name: Literal["BuildTargetsMissingJobSpecs"] parameters: BuildTargetsMissingJobSpecsParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_targets_not_found.py b/foundry/v2/orchestration/errors/_build_targets_not_found.py index d946a40fe..d9c71b522 100644 --- a/foundry/v2/orchestration/errors/_build_targets_not_found.py +++ b/foundry/v2/orchestration/errors/_build_targets_not_found.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError class BuildTargetsNotFoundParameters(TypedDict): @@ -35,7 +34,7 @@ class BuildTargetsNotFoundParameters(TypedDict): @dataclass -class BuildTargetsNotFound(PalantirRPCException): +class BuildTargetsNotFound(NotFoundError): name: Literal["BuildTargetsNotFound"] parameters: BuildTargetsNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_targets_permission_denied.py b/foundry/v2/orchestration/errors/_build_targets_permission_denied.py index fdbaed63b..d41c852a3 100644 --- a/foundry/v2/orchestration/errors/_build_targets_permission_denied.py +++ b/foundry/v2/orchestration/errors/_build_targets_permission_denied.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class BuildTargetsPermissionDeniedParameters(TypedDict): @@ -35,7 +34,7 @@ class BuildTargetsPermissionDeniedParameters(TypedDict): @dataclass -class BuildTargetsPermissionDenied(PalantirRPCException): +class BuildTargetsPermissionDenied(PermissionDeniedError): name: Literal["BuildTargetsPermissionDenied"] parameters: BuildTargetsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_build_targets_resolution_error.py b/foundry/v2/orchestration/errors/_build_targets_resolution_error.py index b0e1dc2ab..9a6c1eb8a 100644 --- a/foundry/v2/orchestration/errors/_build_targets_resolution_error.py +++ b/foundry/v2/orchestration/errors/_build_targets_resolution_error.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class BuildTargetsResolutionErrorParameters(TypedDict): @@ -31,7 +30,7 @@ class BuildTargetsResolutionErrorParameters(TypedDict): @dataclass -class BuildTargetsResolutionError(PalantirRPCException): +class BuildTargetsResolutionError(BadRequestError): name: Literal["BuildTargetsResolutionError"] parameters: BuildTargetsResolutionErrorParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_cancel_build_permission_denied.py b/foundry/v2/orchestration/errors/_cancel_build_permission_denied.py index 90256485e..c2fbca9ad 100644 --- a/foundry/v2/orchestration/errors/_cancel_build_permission_denied.py +++ b/foundry/v2/orchestration/errors/_cancel_build_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._build_rid import BuildRid @@ -35,7 +34,7 @@ class CancelBuildPermissionDeniedParameters(TypedDict): @dataclass -class CancelBuildPermissionDenied(PalantirRPCException): +class CancelBuildPermissionDenied(PermissionDeniedError): name: Literal["CancelBuildPermissionDenied"] parameters: CancelBuildPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_create_builds_permission_denied.py b/foundry/v2/orchestration/errors/_create_builds_permission_denied.py index 179b1eac3..99b40a254 100644 --- a/foundry/v2/orchestration/errors/_create_builds_permission_denied.py +++ b/foundry/v2/orchestration/errors/_create_builds_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateBuildsPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateBuildsPermissionDeniedParameters(TypedDict): @dataclass -class CreateBuildsPermissionDenied(PalantirRPCException): +class CreateBuildsPermissionDenied(PermissionDeniedError): name: Literal["CreateBuildsPermissionDenied"] parameters: CreateBuildsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_create_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_create_schedule_permission_denied.py index 8937143e6..a9bc5e16b 100644 --- a/foundry/v2/orchestration/errors/_create_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_create_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateSchedulePermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateSchedulePermissionDeniedParameters(TypedDict): @dataclass -class CreateSchedulePermissionDenied(PalantirRPCException): +class CreateSchedulePermissionDenied(PermissionDeniedError): name: Literal["CreateSchedulePermissionDenied"] parameters: CreateSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_delete_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_delete_schedule_permission_denied.py index 86a8e8b62..4e2488182 100644 --- a/foundry/v2/orchestration/errors/_delete_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_delete_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class DeleteSchedulePermissionDeniedParameters(TypedDict): @dataclass -class DeleteSchedulePermissionDenied(PalantirRPCException): +class DeleteSchedulePermissionDenied(PermissionDeniedError): name: Literal["DeleteSchedulePermissionDenied"] parameters: DeleteSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_and_trigger.py b/foundry/v2/orchestration/errors/_invalid_and_trigger.py index 21cf59de4..4512bf6f2 100644 --- a/foundry/v2/orchestration/errors/_invalid_and_trigger.py +++ b/foundry/v2/orchestration/errors/_invalid_and_trigger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidAndTriggerParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidAndTriggerParameters(TypedDict): @dataclass -class InvalidAndTrigger(PalantirRPCException): +class InvalidAndTrigger(BadRequestError): name: Literal["InvalidAndTrigger"] parameters: InvalidAndTriggerParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_media_set_trigger.py b/foundry/v2/orchestration/errors/_invalid_media_set_trigger.py index 1ca23a4ea..17f23a5af 100644 --- a/foundry/v2/orchestration/errors/_invalid_media_set_trigger.py +++ b/foundry/v2/orchestration/errors/_invalid_media_set_trigger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.core.models._media_set_rid import MediaSetRid @@ -34,7 +33,7 @@ class InvalidMediaSetTriggerParameters(TypedDict): @dataclass -class InvalidMediaSetTrigger(PalantirRPCException): +class InvalidMediaSetTrigger(BadRequestError): name: Literal["InvalidMediaSetTrigger"] parameters: InvalidMediaSetTriggerParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_or_trigger.py b/foundry/v2/orchestration/errors/_invalid_or_trigger.py index 769c0cb09..728cdc2cb 100644 --- a/foundry/v2/orchestration/errors/_invalid_or_trigger.py +++ b/foundry/v2/orchestration/errors/_invalid_or_trigger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidOrTriggerParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidOrTriggerParameters(TypedDict): @dataclass -class InvalidOrTrigger(PalantirRPCException): +class InvalidOrTrigger(BadRequestError): name: Literal["InvalidOrTrigger"] parameters: InvalidOrTriggerParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_schedule_description.py b/foundry/v2/orchestration/errors/_invalid_schedule_description.py index 692929c52..ccba05e85 100644 --- a/foundry/v2/orchestration/errors/_invalid_schedule_description.py +++ b/foundry/v2/orchestration/errors/_invalid_schedule_description.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidScheduleDescriptionParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidScheduleDescriptionParameters(TypedDict): @dataclass -class InvalidScheduleDescription(PalantirRPCException): +class InvalidScheduleDescription(BadRequestError): name: Literal["InvalidScheduleDescription"] parameters: InvalidScheduleDescriptionParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_schedule_name.py b/foundry/v2/orchestration/errors/_invalid_schedule_name.py index 018165407..a3eb64b0b 100644 --- a/foundry/v2/orchestration/errors/_invalid_schedule_name.py +++ b/foundry/v2/orchestration/errors/_invalid_schedule_name.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidScheduleNameParameters(TypedDict): @@ -31,7 +30,7 @@ class InvalidScheduleNameParameters(TypedDict): @dataclass -class InvalidScheduleName(PalantirRPCException): +class InvalidScheduleName(BadRequestError): name: Literal["InvalidScheduleName"] parameters: InvalidScheduleNameParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_invalid_time_trigger.py b/foundry/v2/orchestration/errors/_invalid_time_trigger.py index 5dd4dcb4b..fab98c85b 100644 --- a/foundry/v2/orchestration/errors/_invalid_time_trigger.py +++ b/foundry/v2/orchestration/errors/_invalid_time_trigger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.orchestration.models._cron_expression import CronExpression @@ -34,7 +33,7 @@ class InvalidTimeTriggerParameters(TypedDict): @dataclass -class InvalidTimeTrigger(PalantirRPCException): +class InvalidTimeTrigger(BadRequestError): name: Literal["InvalidTimeTrigger"] parameters: InvalidTimeTriggerParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_job_not_found.py b/foundry/v2/orchestration/errors/_job_not_found.py index 76ff3500e..1af4596fc 100644 --- a/foundry/v2/orchestration/errors/_job_not_found.py +++ b/foundry/v2/orchestration/errors/_job_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.orchestration.models._job_rid import JobRid @@ -35,7 +34,7 @@ class JobNotFoundParameters(TypedDict): @dataclass -class JobNotFound(PalantirRPCException): +class JobNotFound(NotFoundError): name: Literal["JobNotFound"] parameters: JobNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_missing_build_targets.py b/foundry/v2/orchestration/errors/_missing_build_targets.py index 44c78f90e..f75b13a85 100644 --- a/foundry/v2/orchestration/errors/_missing_build_targets.py +++ b/foundry/v2/orchestration/errors/_missing_build_targets.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingBuildTargetsParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingBuildTargetsParameters(TypedDict): @dataclass -class MissingBuildTargets(PalantirRPCException): +class MissingBuildTargets(BadRequestError): name: Literal["MissingBuildTargets"] parameters: MissingBuildTargetsParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_missing_connecting_build_inputs.py b/foundry/v2/orchestration/errors/_missing_connecting_build_inputs.py index c74c45803..6d49b95a6 100644 --- a/foundry/v2/orchestration/errors/_missing_connecting_build_inputs.py +++ b/foundry/v2/orchestration/errors/_missing_connecting_build_inputs.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingConnectingBuildInputsParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingConnectingBuildInputsParameters(TypedDict): @dataclass -class MissingConnectingBuildInputs(PalantirRPCException): +class MissingConnectingBuildInputs(BadRequestError): name: Literal["MissingConnectingBuildInputs"] parameters: MissingConnectingBuildInputsParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_missing_trigger.py b/foundry/v2/orchestration/errors/_missing_trigger.py index f80a62498..7341d7d59 100644 --- a/foundry/v2/orchestration/errors/_missing_trigger.py +++ b/foundry/v2/orchestration/errors/_missing_trigger.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class MissingTriggerParameters(TypedDict): @@ -31,7 +30,7 @@ class MissingTriggerParameters(TypedDict): @dataclass -class MissingTrigger(PalantirRPCException): +class MissingTrigger(BadRequestError): name: Literal["MissingTrigger"] parameters: MissingTriggerParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_pause_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_pause_schedule_permission_denied.py index ef438bb6d..507800324 100644 --- a/foundry/v2/orchestration/errors/_pause_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_pause_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class PauseSchedulePermissionDeniedParameters(TypedDict): @dataclass -class PauseSchedulePermissionDenied(PalantirRPCException): +class PauseSchedulePermissionDenied(PermissionDeniedError): name: Literal["PauseSchedulePermissionDenied"] parameters: PauseSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_replace_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_replace_schedule_permission_denied.py index 6ed304949..42449fe6e 100644 --- a/foundry/v2/orchestration/errors/_replace_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_replace_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class ReplaceSchedulePermissionDeniedParameters(TypedDict): @dataclass -class ReplaceSchedulePermissionDenied(PalantirRPCException): +class ReplaceSchedulePermissionDenied(PermissionDeniedError): name: Literal["ReplaceSchedulePermissionDenied"] parameters: ReplaceSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_run_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_run_schedule_permission_denied.py index c1fb3a1ae..3413f16f7 100644 --- a/foundry/v2/orchestration/errors/_run_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_run_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class RunSchedulePermissionDeniedParameters(TypedDict): @dataclass -class RunSchedulePermissionDenied(PalantirRPCException): +class RunSchedulePermissionDenied(PermissionDeniedError): name: Literal["RunSchedulePermissionDenied"] parameters: RunSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_schedule_not_found.py b/foundry/v2/orchestration/errors/_schedule_not_found.py index c683afc75..5ac00e719 100644 --- a/foundry/v2/orchestration/errors/_schedule_not_found.py +++ b/foundry/v2/orchestration/errors/_schedule_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class ScheduleNotFoundParameters(TypedDict): @dataclass -class ScheduleNotFound(PalantirRPCException): +class ScheduleNotFound(NotFoundError): name: Literal["ScheduleNotFound"] parameters: ScheduleNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_schedule_trigger_resources_not_found.py b/foundry/v2/orchestration/errors/_schedule_trigger_resources_not_found.py index 647b67984..d4bb97a00 100644 --- a/foundry/v2/orchestration/errors/_schedule_trigger_resources_not_found.py +++ b/foundry/v2/orchestration/errors/_schedule_trigger_resources_not_found.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError class ScheduleTriggerResourcesNotFoundParameters(TypedDict): @@ -35,7 +34,7 @@ class ScheduleTriggerResourcesNotFoundParameters(TypedDict): @dataclass -class ScheduleTriggerResourcesNotFound(PalantirRPCException): +class ScheduleTriggerResourcesNotFound(NotFoundError): name: Literal["ScheduleTriggerResourcesNotFound"] parameters: ScheduleTriggerResourcesNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_schedule_trigger_resources_permission_denied.py b/foundry/v2/orchestration/errors/_schedule_trigger_resources_permission_denied.py index 96e6ac4de..96bb2f8c5 100644 --- a/foundry/v2/orchestration/errors/_schedule_trigger_resources_permission_denied.py +++ b/foundry/v2/orchestration/errors/_schedule_trigger_resources_permission_denied.py @@ -19,11 +19,10 @@ from typing import List from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import RID -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class ScheduleTriggerResourcesPermissionDeniedParameters(TypedDict): @@ -35,7 +34,7 @@ class ScheduleTriggerResourcesPermissionDeniedParameters(TypedDict): @dataclass -class ScheduleTriggerResourcesPermissionDenied(PalantirRPCException): +class ScheduleTriggerResourcesPermissionDenied(PermissionDeniedError): name: Literal["ScheduleTriggerResourcesPermissionDenied"] parameters: ScheduleTriggerResourcesPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_schedule_version_not_found.py b/foundry/v2/orchestration/errors/_schedule_version_not_found.py index 997f821c4..39645fd71 100644 --- a/foundry/v2/orchestration/errors/_schedule_version_not_found.py +++ b/foundry/v2/orchestration/errors/_schedule_version_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.orchestration.models._schedule_version_rid import ScheduleVersionRid @@ -35,7 +34,7 @@ class ScheduleVersionNotFoundParameters(TypedDict): @dataclass -class ScheduleVersionNotFound(PalantirRPCException): +class ScheduleVersionNotFound(NotFoundError): name: Literal["ScheduleVersionNotFound"] parameters: ScheduleVersionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_search_builds_permission_denied.py b/foundry/v2/orchestration/errors/_search_builds_permission_denied.py index 8fbcd0050..49b63537c 100644 --- a/foundry/v2/orchestration/errors/_search_builds_permission_denied.py +++ b/foundry/v2/orchestration/errors/_search_builds_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class SearchBuildsPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class SearchBuildsPermissionDeniedParameters(TypedDict): @dataclass -class SearchBuildsPermissionDenied(PalantirRPCException): +class SearchBuildsPermissionDenied(PermissionDeniedError): name: Literal["SearchBuildsPermissionDenied"] parameters: SearchBuildsPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_target_not_supported.py b/foundry/v2/orchestration/errors/_target_not_supported.py index f53a469de..a276da91b 100644 --- a/foundry/v2/orchestration/errors/_target_not_supported.py +++ b/foundry/v2/orchestration/errors/_target_not_supported.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -37,7 +36,7 @@ class TargetNotSupportedParameters(TypedDict): @dataclass -class TargetNotSupported(PalantirRPCException): +class TargetNotSupported(BadRequestError): name: Literal["TargetNotSupported"] parameters: TargetNotSupportedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/errors/_unpause_schedule_permission_denied.py b/foundry/v2/orchestration/errors/_unpause_schedule_permission_denied.py index 8e81db9b9..67f0ca182 100644 --- a/foundry/v2/orchestration/errors/_unpause_schedule_permission_denied.py +++ b/foundry/v2/orchestration/errors/_unpause_schedule_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.orchestration.models._schedule_rid import ScheduleRid @@ -34,7 +33,7 @@ class UnpauseSchedulePermissionDeniedParameters(TypedDict): @dataclass -class UnpauseSchedulePermissionDenied(PalantirRPCException): +class UnpauseSchedulePermissionDenied(PermissionDeniedError): name: Literal["UnpauseSchedulePermissionDenied"] parameters: UnpauseSchedulePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/orchestration/job.py b/foundry/v2/orchestration/job.py index 5dfc10548..afc4c043d 100644 --- a/foundry/v2/orchestration/job.py +++ b/foundry/v2/orchestration/job.py @@ -31,6 +31,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.orchestration import errors as orchestration_errors from foundry.v2.orchestration.models._job import Job from foundry.v2.orchestration.models._job_rid import JobRid @@ -76,6 +77,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Job + + :raises JobNotFound: The given Job could not be found. """ return self._api_client.call_api( @@ -95,6 +98,9 @@ def get( body_type=None, response_type=Job, request_timeout=request_timeout, + throwable_errors={ + "JobNotFound": orchestration_errors.JobNotFound, + }, ), ).decode() @@ -136,6 +142,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Job] + + :raises JobNotFound: The given Job could not be found. """ return self._api_client.call_api( @@ -155,6 +163,9 @@ def get( body_type=None, response_type=Job, request_timeout=request_timeout, + throwable_errors={ + "JobNotFound": orchestration_errors.JobNotFound, + }, ), ) @@ -196,6 +207,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Job] + + :raises JobNotFound: The given Job could not be found. """ return self._api_client.stream_api( @@ -215,5 +228,8 @@ def get( body_type=None, response_type=Job, request_timeout=request_timeout, + throwable_errors={ + "JobNotFound": orchestration_errors.JobNotFound, + }, ), ) diff --git a/foundry/v2/orchestration/schedule.py b/foundry/v2/orchestration/schedule.py index 769324804..28a719b01 100644 --- a/foundry/v2/orchestration/schedule.py +++ b/foundry/v2/orchestration/schedule.py @@ -37,6 +37,7 @@ from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.orchestration import errors as orchestration_errors from foundry.v2.orchestration.models._create_schedule_request_action import ( CreateScheduleRequestAction, ) # NOQA @@ -126,6 +127,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Schedule + + :raises CreateSchedulePermissionDenied: Could not create the Schedule. """ return self._api_client.call_api( @@ -165,6 +168,9 @@ def create( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, + }, ), ).decode() @@ -188,6 +194,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. """ return self._api_client.call_api( @@ -205,6 +213,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, + }, ), ).decode() @@ -228,6 +239,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Schedule + + :raises ScheduleNotFound: The given Schedule could not be found. """ return self._api_client.call_api( @@ -247,6 +260,9 @@ def get( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ScheduleNotFound": orchestration_errors.ScheduleNotFound, + }, ), ).decode() @@ -270,6 +286,8 @@ def pause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PauseSchedulePermissionDenied: Could not pause the Schedule. """ return self._api_client.call_api( @@ -287,6 +305,9 @@ def pause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, + }, ), ).decode() @@ -327,6 +348,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Schedule + + :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. """ return self._api_client.call_api( @@ -368,6 +391,9 @@ def replace( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, + }, ), ).decode() @@ -391,6 +417,8 @@ def run( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ScheduleRun + + :raises RunSchedulePermissionDenied: Could not run the Schedule. """ return self._api_client.call_api( @@ -410,6 +438,9 @@ def run( body_type=None, response_type=ScheduleRun, request_timeout=request_timeout, + throwable_errors={ + "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, + }, ), ).decode() @@ -461,6 +492,7 @@ def runs( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -518,6 +550,7 @@ def runs_page( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -541,6 +574,8 @@ def unpause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. """ return self._api_client.call_api( @@ -558,6 +593,9 @@ def unpause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, + }, ), ).decode() @@ -613,6 +651,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Schedule] + + :raises CreateSchedulePermissionDenied: Could not create the Schedule. """ return self._api_client.call_api( @@ -652,6 +692,9 @@ def create( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, + }, ), ) @@ -675,6 +718,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. """ return self._api_client.call_api( @@ -692,6 +737,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, + }, ), ) @@ -715,6 +763,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Schedule] + + :raises ScheduleNotFound: The given Schedule could not be found. """ return self._api_client.call_api( @@ -734,6 +784,9 @@ def get( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ScheduleNotFound": orchestration_errors.ScheduleNotFound, + }, ), ) @@ -757,6 +810,8 @@ def pause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PauseSchedulePermissionDenied: Could not pause the Schedule. """ return self._api_client.call_api( @@ -774,6 +829,9 @@ def pause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, + }, ), ) @@ -814,6 +872,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Schedule] + + :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. """ return self._api_client.call_api( @@ -855,6 +915,9 @@ def replace( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, + }, ), ) @@ -878,6 +941,8 @@ def run( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ScheduleRun] + + :raises RunSchedulePermissionDenied: Could not run the Schedule. """ return self._api_client.call_api( @@ -897,6 +962,9 @@ def run( body_type=None, response_type=ScheduleRun, request_timeout=request_timeout, + throwable_errors={ + "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, + }, ), ) @@ -948,6 +1016,7 @@ def runs( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1005,6 +1074,7 @@ def runs_page( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1028,6 +1098,8 @@ def unpause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. """ return self._api_client.call_api( @@ -1045,6 +1117,9 @@ def unpause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, + }, ), ) @@ -1100,6 +1175,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Schedule] + + :raises CreateSchedulePermissionDenied: Could not create the Schedule. """ return self._api_client.stream_api( @@ -1139,6 +1216,9 @@ def create( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "CreateSchedulePermissionDenied": orchestration_errors.CreateSchedulePermissionDenied, + }, ), ) @@ -1162,6 +1242,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteSchedulePermissionDenied: Could not delete the Schedule. """ return self._api_client.stream_api( @@ -1179,6 +1261,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteSchedulePermissionDenied": orchestration_errors.DeleteSchedulePermissionDenied, + }, ), ) @@ -1202,6 +1287,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Schedule] + + :raises ScheduleNotFound: The given Schedule could not be found. """ return self._api_client.stream_api( @@ -1221,6 +1308,9 @@ def get( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ScheduleNotFound": orchestration_errors.ScheduleNotFound, + }, ), ) @@ -1244,6 +1334,8 @@ def pause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PauseSchedulePermissionDenied: Could not pause the Schedule. """ return self._api_client.stream_api( @@ -1261,6 +1353,9 @@ def pause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PauseSchedulePermissionDenied": orchestration_errors.PauseSchedulePermissionDenied, + }, ), ) @@ -1301,6 +1396,8 @@ def replace( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Schedule] + + :raises ReplaceSchedulePermissionDenied: Could not replace the Schedule. """ return self._api_client.stream_api( @@ -1342,6 +1439,9 @@ def replace( ), response_type=Schedule, request_timeout=request_timeout, + throwable_errors={ + "ReplaceSchedulePermissionDenied": orchestration_errors.ReplaceSchedulePermissionDenied, + }, ), ) @@ -1365,6 +1465,8 @@ def run( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ScheduleRun] + + :raises RunSchedulePermissionDenied: Could not run the Schedule. """ return self._api_client.stream_api( @@ -1384,6 +1486,9 @@ def run( body_type=None, response_type=ScheduleRun, request_timeout=request_timeout, + throwable_errors={ + "RunSchedulePermissionDenied": orchestration_errors.RunSchedulePermissionDenied, + }, ), ) @@ -1435,6 +1540,7 @@ def runs( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1492,6 +1598,7 @@ def runs_page( body_type=None, response_type=ListRunsOfScheduleResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -1515,6 +1622,8 @@ def unpause( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises UnpauseSchedulePermissionDenied: Could not unpause the Schedule. """ return self._api_client.stream_api( @@ -1532,5 +1641,8 @@ def unpause( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "UnpauseSchedulePermissionDenied": orchestration_errors.UnpauseSchedulePermissionDenied, + }, ), ) diff --git a/foundry/v2/orchestration/schedule_version.py b/foundry/v2/orchestration/schedule_version.py index 95e06b4f9..4c856d550 100644 --- a/foundry/v2/orchestration/schedule_version.py +++ b/foundry/v2/orchestration/schedule_version.py @@ -31,6 +31,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.orchestration import errors as orchestration_errors from foundry.v2.orchestration.models._schedule import Schedule from foundry.v2.orchestration.models._schedule_version import ScheduleVersion from foundry.v2.orchestration.models._schedule_version_rid import ScheduleVersionRid @@ -79,6 +80,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ScheduleVersion + + :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. """ return self._api_client.call_api( @@ -98,6 +101,9 @@ def get( body_type=None, response_type=ScheduleVersion, request_timeout=request_timeout, + throwable_errors={ + "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, + }, ), ).decode() @@ -140,6 +146,7 @@ def schedule( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -181,6 +188,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ScheduleVersion] + + :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. """ return self._api_client.call_api( @@ -200,6 +209,9 @@ def get( body_type=None, response_type=ScheduleVersion, request_timeout=request_timeout, + throwable_errors={ + "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, + }, ), ) @@ -242,6 +254,7 @@ def schedule( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -283,6 +296,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ScheduleVersion] + + :raises ScheduleVersionNotFound: The given ScheduleVersion could not be found. """ return self._api_client.stream_api( @@ -302,6 +317,9 @@ def get( body_type=None, response_type=ScheduleVersion, request_timeout=request_timeout, + throwable_errors={ + "ScheduleVersionNotFound": orchestration_errors.ScheduleVersionNotFound, + }, ), ) @@ -344,5 +362,6 @@ def schedule( body_type=None, response_type=Schedule, request_timeout=request_timeout, + throwable_errors={}, ), ) diff --git a/foundry/v2/streams/dataset.py b/foundry/v2/streams/dataset.py index d25891dea..5e459ceb7 100644 --- a/foundry/v2/streams/dataset.py +++ b/foundry/v2/streams/dataset.py @@ -37,7 +37,9 @@ from foundry.v2.core.models._stream_schema_dict import StreamSchemaDict from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_name import DatasetName +from foundry.v2.filesystem import errors as filesystem_errors from foundry.v2.filesystem.models._folder_rid import FolderRid +from foundry.v2.streams import errors as streams_errors from foundry.v2.streams.models._compressed import Compressed from foundry.v2.streams.models._dataset import Dataset from foundry.v2.streams.models._partitions_count import PartitionsCount @@ -108,6 +110,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Dataset + + :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -145,6 +150,10 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ).decode() @@ -207,6 +216,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Dataset] + + :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.call_api( @@ -244,6 +256,10 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) @@ -306,6 +322,9 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Dataset] + + :raises CreateStreamingDatasetPermissionDenied: Could not create the Dataset. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. """ return self._api_client.stream_api( @@ -343,5 +362,9 @@ def create( ), response_type=Dataset, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamingDatasetPermissionDenied": streams_errors.CreateStreamingDatasetPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, ), ) diff --git a/foundry/v2/streams/errors/_cannot_create_streaming_dataset_in_user_folder.py b/foundry/v2/streams/errors/_cannot_create_streaming_dataset_in_user_folder.py index d17993588..c2c0183e3 100644 --- a/foundry/v2/streams/errors/_cannot_create_streaming_dataset_in_user_folder.py +++ b/foundry/v2/streams/errors/_cannot_create_streaming_dataset_in_user_folder.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.filesystem.models._folder_rid import FolderRid @@ -34,7 +33,7 @@ class CannotCreateStreamingDatasetInUserFolderParameters(TypedDict): @dataclass -class CannotCreateStreamingDatasetInUserFolder(PalantirRPCException): +class CannotCreateStreamingDatasetInUserFolder(BadRequestError): name: Literal["CannotCreateStreamingDatasetInUserFolder"] parameters: CannotCreateStreamingDatasetInUserFolderParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_cannot_write_to_trashed_stream.py b/foundry/v2/streams/errors/_cannot_write_to_trashed_stream.py index 830fb40d7..c6e8c62a0 100644 --- a/foundry/v2/streams/errors/_cannot_write_to_trashed_stream.py +++ b/foundry/v2/streams/errors/_cannot_write_to_trashed_stream.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -34,7 +33,7 @@ class CannotWriteToTrashedStreamParameters(TypedDict): @dataclass -class CannotWriteToTrashedStream(PalantirRPCException): +class CannotWriteToTrashedStream(BadRequestError): name: Literal["CannotWriteToTrashedStream"] parameters: CannotWriteToTrashedStreamParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_create_stream_permission_denied.py b/foundry/v2/streams/errors/_create_stream_permission_denied.py index 73dc1f5da..9b9661277 100644 --- a/foundry/v2/streams/errors/_create_stream_permission_denied.py +++ b/foundry/v2/streams/errors/_create_stream_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class CreateStreamPermissionDeniedParameters(TypedDict): @dataclass -class CreateStreamPermissionDenied(PalantirRPCException): +class CreateStreamPermissionDenied(PermissionDeniedError): name: Literal["CreateStreamPermissionDenied"] parameters: CreateStreamPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_create_streaming_dataset_permission_denied.py b/foundry/v2/streams/errors/_create_streaming_dataset_permission_denied.py index 87cc9751b..98e4770fb 100644 --- a/foundry/v2/streams/errors/_create_streaming_dataset_permission_denied.py +++ b/foundry/v2/streams/errors/_create_streaming_dataset_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError class CreateStreamingDatasetPermissionDeniedParameters(TypedDict): @@ -31,7 +30,7 @@ class CreateStreamingDatasetPermissionDeniedParameters(TypedDict): @dataclass -class CreateStreamingDatasetPermissionDenied(PalantirRPCException): +class CreateStreamingDatasetPermissionDenied(PermissionDeniedError): name: Literal["CreateStreamingDatasetPermissionDenied"] parameters: CreateStreamingDatasetPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_failed_to_process_binary_record.py b/foundry/v2/streams/errors/_failed_to_process_binary_record.py index be87e0c9d..2a4bfc6f5 100644 --- a/foundry/v2/streams/errors/_failed_to_process_binary_record.py +++ b/foundry/v2/streams/errors/_failed_to_process_binary_record.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import InternalServerError class FailedToProcessBinaryRecordParameters(TypedDict): @@ -31,7 +30,7 @@ class FailedToProcessBinaryRecordParameters(TypedDict): @dataclass -class FailedToProcessBinaryRecord(PalantirRPCException): +class FailedToProcessBinaryRecord(InternalServerError): name: Literal["FailedToProcessBinaryRecord"] parameters: FailedToProcessBinaryRecordParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_invalid_stream_no_schema.py b/foundry/v2/streams/errors/_invalid_stream_no_schema.py index 2bd6aba58..b3614f6f1 100644 --- a/foundry/v2/streams/errors/_invalid_stream_no_schema.py +++ b/foundry/v2/streams/errors/_invalid_stream_no_schema.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.streams.models._view_rid import ViewRid @@ -41,7 +40,7 @@ class InvalidStreamNoSchemaParameters(TypedDict): @dataclass -class InvalidStreamNoSchema(PalantirRPCException): +class InvalidStreamNoSchema(BadRequestError): name: Literal["InvalidStreamNoSchema"] parameters: InvalidStreamNoSchemaParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_invalid_stream_type.py b/foundry/v2/streams/errors/_invalid_stream_type.py index 79d3aa985..7fe10f808 100644 --- a/foundry/v2/streams/errors/_invalid_stream_type.py +++ b/foundry/v2/streams/errors/_invalid_stream_type.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidStreamTypeParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidStreamTypeParameters(TypedDict): @dataclass -class InvalidStreamType(PalantirRPCException): +class InvalidStreamType(BadRequestError): name: Literal["InvalidStreamType"] parameters: InvalidStreamTypeParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_publish_binary_record_to_stream_permission_denied.py b/foundry/v2/streams/errors/_publish_binary_record_to_stream_permission_denied.py index 1d5e98155..04a72bb3c 100644 --- a/foundry/v2/streams/errors/_publish_binary_record_to_stream_permission_denied.py +++ b/foundry/v2/streams/errors/_publish_binary_record_to_stream_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class PublishBinaryRecordToStreamPermissionDeniedParameters(TypedDict): @dataclass -class PublishBinaryRecordToStreamPermissionDenied(PalantirRPCException): +class PublishBinaryRecordToStreamPermissionDenied(PermissionDeniedError): name: Literal["PublishBinaryRecordToStreamPermissionDenied"] parameters: PublishBinaryRecordToStreamPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_publish_record_to_stream_permission_denied.py b/foundry/v2/streams/errors/_publish_record_to_stream_permission_denied.py index 5958b926c..b641a29a9 100644 --- a/foundry/v2/streams/errors/_publish_record_to_stream_permission_denied.py +++ b/foundry/v2/streams/errors/_publish_record_to_stream_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class PublishRecordToStreamPermissionDeniedParameters(TypedDict): @dataclass -class PublishRecordToStreamPermissionDenied(PalantirRPCException): +class PublishRecordToStreamPermissionDenied(PermissionDeniedError): name: Literal["PublishRecordToStreamPermissionDenied"] parameters: PublishRecordToStreamPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_publish_records_to_stream_permission_denied.py b/foundry/v2/streams/errors/_publish_records_to_stream_permission_denied.py index 9a889ba52..a26dafabb 100644 --- a/foundry/v2/streams/errors/_publish_records_to_stream_permission_denied.py +++ b/foundry/v2/streams/errors/_publish_records_to_stream_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class PublishRecordsToStreamPermissionDeniedParameters(TypedDict): @dataclass -class PublishRecordsToStreamPermissionDenied(PalantirRPCException): +class PublishRecordsToStreamPermissionDenied(PermissionDeniedError): name: Literal["PublishRecordsToStreamPermissionDenied"] parameters: PublishRecordsToStreamPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_record_does_not_match_stream_schema.py b/foundry/v2/streams/errors/_record_does_not_match_stream_schema.py index b5d3dc5bc..470c89866 100644 --- a/foundry/v2/streams/errors/_record_does_not_match_stream_schema.py +++ b/foundry/v2/streams/errors/_record_does_not_match_stream_schema.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import NotRequired from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid from foundry.v2.streams.models._view_rid import ViewRid @@ -41,7 +40,7 @@ class RecordDoesNotMatchStreamSchemaParameters(TypedDict): @dataclass -class RecordDoesNotMatchStreamSchema(PalantirRPCException): +class RecordDoesNotMatchStreamSchema(BadRequestError): name: Literal["RecordDoesNotMatchStreamSchema"] parameters: RecordDoesNotMatchStreamSchemaParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_record_too_large.py b/foundry/v2/streams/errors/_record_too_large.py index 6beecf43f..aa7f36069 100644 --- a/foundry/v2/streams/errors/_record_too_large.py +++ b/foundry/v2/streams/errors/_record_too_large.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import RequestEntityTooLargeError class RecordTooLargeParameters(TypedDict): @@ -31,7 +30,7 @@ class RecordTooLargeParameters(TypedDict): @dataclass -class RecordTooLarge(PalantirRPCException): +class RecordTooLarge(RequestEntityTooLargeError): name: Literal["RecordTooLarge"] parameters: RecordTooLargeParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_reset_stream_permission_denied.py b/foundry/v2/streams/errors/_reset_stream_permission_denied.py index 0b5a542a4..0e7768d84 100644 --- a/foundry/v2/streams/errors/_reset_stream_permission_denied.py +++ b/foundry/v2/streams/errors/_reset_stream_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class ResetStreamPermissionDeniedParameters(TypedDict): @dataclass -class ResetStreamPermissionDenied(PalantirRPCException): +class ResetStreamPermissionDenied(PermissionDeniedError): name: Literal["ResetStreamPermissionDenied"] parameters: ResetStreamPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_stream_not_found.py b/foundry/v2/streams/errors/_stream_not_found.py index 82b259387..4d744c521 100644 --- a/foundry/v2/streams/errors/_stream_not_found.py +++ b/foundry/v2/streams/errors/_stream_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid @@ -37,7 +36,7 @@ class StreamNotFoundParameters(TypedDict): @dataclass -class StreamNotFound(PalantirRPCException): +class StreamNotFound(NotFoundError): name: Literal["StreamNotFound"] parameters: StreamNotFoundParameters error_instance_id: str diff --git a/foundry/v2/streams/errors/_view_not_found.py b/foundry/v2/streams/errors/_view_not_found.py index 9715970ab..5de433b5b 100644 --- a/foundry/v2/streams/errors/_view_not_found.py +++ b/foundry/v2/streams/errors/_view_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.streams.models._view_rid import ViewRid @@ -34,7 +33,7 @@ class ViewNotFoundParameters(TypedDict): @dataclass -class ViewNotFound(PalantirRPCException): +class ViewNotFound(NotFoundError): name: Literal["ViewNotFound"] parameters: ViewNotFoundParameters error_instance_id: str diff --git a/foundry/v2/streams/stream.py b/foundry/v2/streams/stream.py index 18156a1a1..4a84bc853 100644 --- a/foundry/v2/streams/stream.py +++ b/foundry/v2/streams/stream.py @@ -38,6 +38,7 @@ from foundry.v2.core.models._stream_schema_dict import StreamSchemaDict from foundry.v2.datasets.models._branch_name import BranchName from foundry.v2.datasets.models._dataset_rid import DatasetRid +from foundry.v2.streams import errors as streams_errors from foundry.v2.streams.models._compressed import Compressed from foundry.v2.streams.models._create_stream_request_stream_schema import ( CreateStreamRequestStreamSchema, @@ -109,6 +110,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Stream + + :raises CreateStreamPermissionDenied: Could not create the Stream. """ return self._api_client.call_api( @@ -146,6 +149,9 @@ def create( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, + }, ), ).decode() @@ -174,6 +180,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Stream + + :raises StreamNotFound: The given Stream could not be found. """ return self._api_client.call_api( @@ -194,6 +202,9 @@ def get( body_type=None, response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "StreamNotFound": streams_errors.StreamNotFound, + }, ), ).decode() @@ -227,6 +238,8 @@ def publish_binary_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. """ return self._api_client.call_api( @@ -248,6 +261,9 @@ def publish_binary_record( body_type=bytes, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, + }, ), ).decode() @@ -282,6 +298,8 @@ def publish_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. """ return self._api_client.call_api( @@ -311,6 +329,9 @@ def publish_record( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, + }, ), ).decode() @@ -345,6 +366,8 @@ def publish_records( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. """ return self._api_client.call_api( @@ -374,6 +397,9 @@ def publish_records( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, + }, ), ).decode() @@ -419,6 +445,8 @@ def reset( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Stream + + :raises ResetStreamPermissionDenied: Could not reset the Stream. """ return self._api_client.call_api( @@ -453,6 +481,9 @@ def reset( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, + }, ), ).decode() @@ -510,6 +541,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Stream] + + :raises CreateStreamPermissionDenied: Could not create the Stream. """ return self._api_client.call_api( @@ -547,6 +580,9 @@ def create( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, + }, ), ) @@ -575,6 +611,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Stream] + + :raises StreamNotFound: The given Stream could not be found. """ return self._api_client.call_api( @@ -595,6 +633,9 @@ def get( body_type=None, response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "StreamNotFound": streams_errors.StreamNotFound, + }, ), ) @@ -628,6 +669,8 @@ def publish_binary_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. """ return self._api_client.call_api( @@ -649,6 +692,9 @@ def publish_binary_record( body_type=bytes, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, + }, ), ) @@ -683,6 +729,8 @@ def publish_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. """ return self._api_client.call_api( @@ -712,6 +760,9 @@ def publish_record( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, + }, ), ) @@ -746,6 +797,8 @@ def publish_records( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. """ return self._api_client.call_api( @@ -775,6 +828,9 @@ def publish_records( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, + }, ), ) @@ -820,6 +876,8 @@ def reset( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Stream] + + :raises ResetStreamPermissionDenied: Could not reset the Stream. """ return self._api_client.call_api( @@ -854,6 +912,9 @@ def reset( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, + }, ), ) @@ -911,6 +972,8 @@ def create( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Stream] + + :raises CreateStreamPermissionDenied: Could not create the Stream. """ return self._api_client.stream_api( @@ -948,6 +1011,9 @@ def create( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "CreateStreamPermissionDenied": streams_errors.CreateStreamPermissionDenied, + }, ), ) @@ -976,6 +1042,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Stream] + + :raises StreamNotFound: The given Stream could not be found. """ return self._api_client.stream_api( @@ -996,6 +1064,9 @@ def get( body_type=None, response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "StreamNotFound": streams_errors.StreamNotFound, + }, ), ) @@ -1029,6 +1100,8 @@ def publish_binary_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PublishBinaryRecordToStreamPermissionDenied: Could not publishBinaryRecord the Stream. """ return self._api_client.stream_api( @@ -1050,6 +1123,9 @@ def publish_binary_record( body_type=bytes, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishBinaryRecordToStreamPermissionDenied": streams_errors.PublishBinaryRecordToStreamPermissionDenied, + }, ), ) @@ -1084,6 +1160,8 @@ def publish_record( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PublishRecordToStreamPermissionDenied: Could not publishRecord the Stream. """ return self._api_client.stream_api( @@ -1113,6 +1191,9 @@ def publish_record( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordToStreamPermissionDenied": streams_errors.PublishRecordToStreamPermissionDenied, + }, ), ) @@ -1147,6 +1228,8 @@ def publish_records( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises PublishRecordsToStreamPermissionDenied: Could not publishRecords the Stream. """ return self._api_client.stream_api( @@ -1176,6 +1259,9 @@ def publish_records( ), response_type=None, request_timeout=request_timeout, + throwable_errors={ + "PublishRecordsToStreamPermissionDenied": streams_errors.PublishRecordsToStreamPermissionDenied, + }, ), ) @@ -1221,6 +1307,8 @@ def reset( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Stream] + + :raises ResetStreamPermissionDenied: Could not reset the Stream. """ return self._api_client.stream_api( @@ -1255,5 +1343,8 @@ def reset( ), response_type=Stream, request_timeout=request_timeout, + throwable_errors={ + "ResetStreamPermissionDenied": streams_errors.ResetStreamPermissionDenied, + }, ), ) diff --git a/foundry/v2/third_party_applications/errors/_cannot_delete_deployed_version.py b/foundry/v2/third_party_applications/errors/_cannot_delete_deployed_version.py index e671e4e60..feabce576 100644 --- a/foundry/v2/third_party_applications/errors/_cannot_delete_deployed_version.py +++ b/foundry/v2/third_party_applications/errors/_cannot_delete_deployed_version.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError from foundry.v2.third_party_applications.models._version_version import VersionVersion @@ -34,7 +33,7 @@ class CannotDeleteDeployedVersionParameters(TypedDict): @dataclass -class CannotDeleteDeployedVersion(PalantirRPCException): +class CannotDeleteDeployedVersion(BadRequestError): name: Literal["CannotDeleteDeployedVersion"] parameters: CannotDeleteDeployedVersionParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_delete_version_permission_denied.py b/foundry/v2/third_party_applications/errors/_delete_version_permission_denied.py index 9a5a649a3..aa56360ce 100644 --- a/foundry/v2/third_party_applications/errors/_delete_version_permission_denied.py +++ b/foundry/v2/third_party_applications/errors/_delete_version_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -35,13 +34,12 @@ class DeleteVersionPermissionDeniedParameters(TypedDict): thirdPartyApplicationRid: ThirdPartyApplicationRid """An RID identifying a third-party application created in Developer Console.""" - versionVersion: VersionVersion """The semantic version of the Website.""" @dataclass -class DeleteVersionPermissionDenied(PalantirRPCException): +class DeleteVersionPermissionDenied(PermissionDeniedError): name: Literal["DeleteVersionPermissionDenied"] parameters: DeleteVersionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_deploy_website_permission_denied.py b/foundry/v2/third_party_applications/errors/_deploy_website_permission_denied.py index 007be1546..af5d8427c 100644 --- a/foundry/v2/third_party_applications/errors/_deploy_website_permission_denied.py +++ b/foundry/v2/third_party_applications/errors/_deploy_website_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class DeployWebsitePermissionDeniedParameters(TypedDict): @dataclass -class DeployWebsitePermissionDenied(PalantirRPCException): +class DeployWebsitePermissionDenied(PermissionDeniedError): name: Literal["DeployWebsitePermissionDenied"] parameters: DeployWebsitePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_file_count_limit_exceeded.py b/foundry/v2/third_party_applications/errors/_file_count_limit_exceeded.py index 8ebf03383..21e8c6856 100644 --- a/foundry/v2/third_party_applications/errors/_file_count_limit_exceeded.py +++ b/foundry/v2/third_party_applications/errors/_file_count_limit_exceeded.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FileCountLimitExceededParameters(TypedDict): @@ -33,7 +32,7 @@ class FileCountLimitExceededParameters(TypedDict): @dataclass -class FileCountLimitExceeded(PalantirRPCException): +class FileCountLimitExceeded(BadRequestError): name: Literal["FileCountLimitExceeded"] parameters: FileCountLimitExceededParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_file_size_limit_exceeded.py b/foundry/v2/third_party_applications/errors/_file_size_limit_exceeded.py index 6c151c9ae..3ab603050 100644 --- a/foundry/v2/third_party_applications/errors/_file_size_limit_exceeded.py +++ b/foundry/v2/third_party_applications/errors/_file_size_limit_exceeded.py @@ -18,11 +18,10 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict from foundry._core.utils import Long -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class FileSizeLimitExceededParameters(TypedDict): @@ -41,7 +40,7 @@ class FileSizeLimitExceededParameters(TypedDict): @dataclass -class FileSizeLimitExceeded(PalantirRPCException): +class FileSizeLimitExceeded(BadRequestError): name: Literal["FileSizeLimitExceeded"] parameters: FileSizeLimitExceededParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_invalid_version.py b/foundry/v2/third_party_applications/errors/_invalid_version.py index a3ea74a53..0c60c50fd 100644 --- a/foundry/v2/third_party_applications/errors/_invalid_version.py +++ b/foundry/v2/third_party_applications/errors/_invalid_version.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class InvalidVersionParameters(TypedDict): @@ -33,7 +32,7 @@ class InvalidVersionParameters(TypedDict): @dataclass -class InvalidVersion(PalantirRPCException): +class InvalidVersion(BadRequestError): name: Literal["InvalidVersion"] parameters: InvalidVersionParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_third_party_application_not_found.py b/foundry/v2/third_party_applications/errors/_third_party_application_not_found.py index c3334ebae..f27e33fec 100644 --- a/foundry/v2/third_party_applications/errors/_third_party_application_not_found.py +++ b/foundry/v2/third_party_applications/errors/_third_party_application_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class ThirdPartyApplicationNotFoundParameters(TypedDict): @dataclass -class ThirdPartyApplicationNotFound(PalantirRPCException): +class ThirdPartyApplicationNotFound(NotFoundError): name: Literal["ThirdPartyApplicationNotFound"] parameters: ThirdPartyApplicationNotFoundParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_undeploy_website_permission_denied.py b/foundry/v2/third_party_applications/errors/_undeploy_website_permission_denied.py index 1179d9228..10ba94327 100644 --- a/foundry/v2/third_party_applications/errors/_undeploy_website_permission_denied.py +++ b/foundry/v2/third_party_applications/errors/_undeploy_website_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class UndeployWebsitePermissionDeniedParameters(TypedDict): @dataclass -class UndeployWebsitePermissionDenied(PalantirRPCException): +class UndeployWebsitePermissionDenied(PermissionDeniedError): name: Literal["UndeployWebsitePermissionDenied"] parameters: UndeployWebsitePermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_upload_snapshot_version_permission_denied.py b/foundry/v2/third_party_applications/errors/_upload_snapshot_version_permission_denied.py index ee449e635..253f89775 100644 --- a/foundry/v2/third_party_applications/errors/_upload_snapshot_version_permission_denied.py +++ b/foundry/v2/third_party_applications/errors/_upload_snapshot_version_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class UploadSnapshotVersionPermissionDeniedParameters(TypedDict): @dataclass -class UploadSnapshotVersionPermissionDenied(PalantirRPCException): +class UploadSnapshotVersionPermissionDenied(PermissionDeniedError): name: Literal["UploadSnapshotVersionPermissionDenied"] parameters: UploadSnapshotVersionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_upload_version_permission_denied.py b/foundry/v2/third_party_applications/errors/_upload_version_permission_denied.py index a090cb05d..ae0d3cf92 100644 --- a/foundry/v2/third_party_applications/errors/_upload_version_permission_denied.py +++ b/foundry/v2/third_party_applications/errors/_upload_version_permission_denied.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import PermissionDeniedError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class UploadVersionPermissionDeniedParameters(TypedDict): @dataclass -class UploadVersionPermissionDenied(PalantirRPCException): +class UploadVersionPermissionDenied(PermissionDeniedError): name: Literal["UploadVersionPermissionDenied"] parameters: UploadVersionPermissionDeniedParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_version_already_exists.py b/foundry/v2/third_party_applications/errors/_version_already_exists.py index 618f07e40..9ef60a80f 100644 --- a/foundry/v2/third_party_applications/errors/_version_already_exists.py +++ b/foundry/v2/third_party_applications/errors/_version_already_exists.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import ConflictError from foundry.v2.third_party_applications.models._version_version import VersionVersion @@ -34,7 +33,7 @@ class VersionAlreadyExistsParameters(TypedDict): @dataclass -class VersionAlreadyExists(PalantirRPCException): +class VersionAlreadyExists(ConflictError): name: Literal["VersionAlreadyExists"] parameters: VersionAlreadyExistsParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_version_limit_exceeded.py b/foundry/v2/third_party_applications/errors/_version_limit_exceeded.py index 27057b0b7..5bcacc6ad 100644 --- a/foundry/v2/third_party_applications/errors/_version_limit_exceeded.py +++ b/foundry/v2/third_party_applications/errors/_version_limit_exceeded.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import BadRequestError class VersionLimitExceededParameters(TypedDict): @@ -36,7 +35,7 @@ class VersionLimitExceededParameters(TypedDict): @dataclass -class VersionLimitExceeded(PalantirRPCException): +class VersionLimitExceeded(BadRequestError): name: Literal["VersionLimitExceeded"] parameters: VersionLimitExceededParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_version_not_found.py b/foundry/v2/third_party_applications/errors/_version_not_found.py index 091b425e7..286c04641 100644 --- a/foundry/v2/third_party_applications/errors/_version_not_found.py +++ b/foundry/v2/third_party_applications/errors/_version_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -35,13 +34,12 @@ class VersionNotFoundParameters(TypedDict): thirdPartyApplicationRid: ThirdPartyApplicationRid """An RID identifying a third-party application created in Developer Console.""" - versionVersion: VersionVersion """The semantic version of the Website.""" @dataclass -class VersionNotFound(PalantirRPCException): +class VersionNotFound(NotFoundError): name: Literal["VersionNotFound"] parameters: VersionNotFoundParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/errors/_website_not_found.py b/foundry/v2/third_party_applications/errors/_website_not_found.py index 33c0c15ad..f57532e83 100644 --- a/foundry/v2/third_party_applications/errors/_website_not_found.py +++ b/foundry/v2/third_party_applications/errors/_website_not_found.py @@ -18,10 +18,9 @@ from dataclasses import dataclass from typing import Literal -import pydantic from typing_extensions import TypedDict -from foundry._errors import PalantirRPCException +from foundry._errors import NotFoundError from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -37,7 +36,7 @@ class WebsiteNotFoundParameters(TypedDict): @dataclass -class WebsiteNotFound(PalantirRPCException): +class WebsiteNotFound(NotFoundError): name: Literal["WebsiteNotFound"] parameters: WebsiteNotFoundParameters error_instance_id: str diff --git a/foundry/v2/third_party_applications/third_party_application.py b/foundry/v2/third_party_applications/third_party_application.py index ec6e87c79..af27ccc3e 100644 --- a/foundry/v2/third_party_applications/third_party_application.py +++ b/foundry/v2/third_party_applications/third_party_application.py @@ -31,6 +31,7 @@ from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.third_party_applications import errors as third_party_applications_errors # NOQA from foundry.v2.third_party_applications.models._third_party_application import ( ThirdPartyApplication, ) # NOQA @@ -84,6 +85,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ThirdPartyApplication + + :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. """ return self._api_client.call_api( @@ -103,6 +106,9 @@ def get( body_type=None, response_type=ThirdPartyApplication, request_timeout=request_timeout, + throwable_errors={ + "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, + }, ), ).decode() @@ -144,6 +150,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[ThirdPartyApplication] + + :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. """ return self._api_client.call_api( @@ -163,6 +171,9 @@ def get( body_type=None, response_type=ThirdPartyApplication, request_timeout=request_timeout, + throwable_errors={ + "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, + }, ), ) @@ -204,6 +215,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[ThirdPartyApplication] + + :raises ThirdPartyApplicationNotFound: The given ThirdPartyApplication could not be found. """ return self._api_client.stream_api( @@ -223,5 +236,8 @@ def get( body_type=None, response_type=ThirdPartyApplication, request_timeout=request_timeout, + throwable_errors={ + "ThirdPartyApplicationNotFound": third_party_applications_errors.ThirdPartyApplicationNotFound, + }, ), ) diff --git a/foundry/v2/third_party_applications/version.py b/foundry/v2/third_party_applications/version.py index c97db0818..1d72f94f4 100644 --- a/foundry/v2/third_party_applications/version.py +++ b/foundry/v2/third_party_applications/version.py @@ -35,6 +35,7 @@ from foundry.v2.core.models._page_size import PageSize from foundry.v2.core.models._page_token import PageToken from foundry.v2.core.models._preview_mode import PreviewMode +from foundry.v2.third_party_applications import errors as third_party_applications_errors # NOQA from foundry.v2.third_party_applications.models._list_versions_response import ( ListVersionsResponse, ) # NOQA @@ -86,6 +87,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: None + + :raises DeleteVersionPermissionDenied: Could not delete the Version. """ return self._api_client.call_api( @@ -102,6 +105,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, + }, ), ).decode() @@ -125,6 +131,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Version + + :raises VersionNotFound: The given Version could not be found. """ return self._api_client.call_api( @@ -143,6 +151,9 @@ def get( body_type=None, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "VersionNotFound": third_party_applications_errors.VersionNotFound, + }, ), ).decode() @@ -191,6 +202,7 @@ def list( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -245,6 +257,7 @@ def page( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ).decode() @@ -271,6 +284,8 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Version + + :raises UploadVersionPermissionDenied: Could not upload the Version. """ return self._api_client.call_api( @@ -291,6 +306,9 @@ def upload( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, + }, ), ).decode() @@ -324,6 +342,8 @@ def upload_snapshot( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Version + + :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. """ return self._api_client.call_api( @@ -346,6 +366,9 @@ def upload_snapshot( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, + }, ), ).decode() @@ -387,6 +410,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[None] + + :raises DeleteVersionPermissionDenied: Could not delete the Version. """ return self._api_client.call_api( @@ -403,6 +428,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, + }, ), ) @@ -426,6 +454,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Version] + + :raises VersionNotFound: The given Version could not be found. """ return self._api_client.call_api( @@ -444,6 +474,9 @@ def get( body_type=None, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "VersionNotFound": third_party_applications_errors.VersionNotFound, + }, ), ) @@ -492,6 +525,7 @@ def list( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -546,6 +580,7 @@ def page( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -572,6 +607,8 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Version] + + :raises UploadVersionPermissionDenied: Could not upload the Version. """ return self._api_client.call_api( @@ -592,6 +629,9 @@ def upload( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, + }, ), ) @@ -625,6 +665,8 @@ def upload_snapshot( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Version] + + :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. """ return self._api_client.call_api( @@ -647,6 +689,9 @@ def upload_snapshot( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, + }, ), ) @@ -688,6 +733,8 @@ def delete( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[None] + + :raises DeleteVersionPermissionDenied: Could not delete the Version. """ return self._api_client.stream_api( @@ -704,6 +751,9 @@ def delete( body_type=None, response_type=None, request_timeout=request_timeout, + throwable_errors={ + "DeleteVersionPermissionDenied": third_party_applications_errors.DeleteVersionPermissionDenied, + }, ), ) @@ -727,6 +777,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Version] + + :raises VersionNotFound: The given Version could not be found. """ return self._api_client.stream_api( @@ -745,6 +797,9 @@ def get( body_type=None, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "VersionNotFound": third_party_applications_errors.VersionNotFound, + }, ), ) @@ -793,6 +848,7 @@ def list( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -847,6 +903,7 @@ def page( body_type=None, response_type=ListVersionsResponse, request_timeout=request_timeout, + throwable_errors={}, ), ) @@ -873,6 +930,8 @@ def upload( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Version] + + :raises UploadVersionPermissionDenied: Could not upload the Version. """ return self._api_client.stream_api( @@ -893,6 +952,9 @@ def upload( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadVersionPermissionDenied": third_party_applications_errors.UploadVersionPermissionDenied, + }, ), ) @@ -926,6 +988,8 @@ def upload_snapshot( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Version] + + :raises UploadSnapshotVersionPermissionDenied: Could not uploadSnapshot the Version. """ return self._api_client.stream_api( @@ -948,5 +1012,8 @@ def upload_snapshot( body_type=bytes, response_type=Version, request_timeout=request_timeout, + throwable_errors={ + "UploadSnapshotVersionPermissionDenied": third_party_applications_errors.UploadSnapshotVersionPermissionDenied, + }, ), ) diff --git a/foundry/v2/third_party_applications/website.py b/foundry/v2/third_party_applications/website.py index 8f7ec3ab6..740b3ac49 100644 --- a/foundry/v2/third_party_applications/website.py +++ b/foundry/v2/third_party_applications/website.py @@ -31,6 +31,7 @@ from foundry._core import StreamingContextManager from foundry._core.utils import maybe_ignore_preview from foundry._errors import handle_unexpected +from foundry.v2.third_party_applications import errors as third_party_applications_errors # NOQA from foundry.v2.third_party_applications.models._third_party_application_rid import ( ThirdPartyApplicationRid, ) # NOQA @@ -81,6 +82,8 @@ def deploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Website + + :raises DeployWebsitePermissionDenied: Could not deploy the Website. """ return self._api_client.call_api( @@ -106,6 +109,9 @@ def deploy( ), response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, + }, ), ).decode() @@ -126,6 +132,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Website + + :raises WebsiteNotFound: The given Website could not be found. """ return self._api_client.call_api( @@ -143,6 +151,9 @@ def get( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, + }, ), ).decode() @@ -163,6 +174,8 @@ def undeploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: Website + + :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. """ return self._api_client.call_api( @@ -180,6 +193,9 @@ def undeploy( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, + }, ), ).decode() @@ -221,6 +237,8 @@ def deploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Website] + + :raises DeployWebsitePermissionDenied: Could not deploy the Website. """ return self._api_client.call_api( @@ -246,6 +264,9 @@ def deploy( ), response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, + }, ), ) @@ -266,6 +287,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Website] + + :raises WebsiteNotFound: The given Website could not be found. """ return self._api_client.call_api( @@ -283,6 +306,9 @@ def get( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, + }, ), ) @@ -303,6 +329,8 @@ def undeploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: ApiResponse[Website] + + :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. """ return self._api_client.call_api( @@ -320,6 +348,9 @@ def undeploy( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, + }, ), ) @@ -361,6 +392,8 @@ def deploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Website] + + :raises DeployWebsitePermissionDenied: Could not deploy the Website. """ return self._api_client.stream_api( @@ -386,6 +419,9 @@ def deploy( ), response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "DeployWebsitePermissionDenied": third_party_applications_errors.DeployWebsitePermissionDenied, + }, ), ) @@ -406,6 +442,8 @@ def get( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Website] + + :raises WebsiteNotFound: The given Website could not be found. """ return self._api_client.stream_api( @@ -423,6 +461,9 @@ def get( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "WebsiteNotFound": third_party_applications_errors.WebsiteNotFound, + }, ), ) @@ -443,6 +484,8 @@ def undeploy( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: StreamingContextManager[Website] + + :raises UndeployWebsitePermissionDenied: Could not undeploy the Website. """ return self._api_client.stream_api( @@ -460,5 +503,8 @@ def undeploy( body_type=None, response_type=Website, request_timeout=request_timeout, + throwable_errors={ + "UndeployWebsitePermissionDenied": third_party_applications_errors.UndeployWebsitePermissionDenied, + }, ), ) diff --git a/tests/test_api_client.py b/tests/test_api_client.py index c833d8c8c..3fb515bcb 100644 --- a/tests/test_api_client.py +++ b/tests/test_api_client.py @@ -30,6 +30,7 @@ from foundry import BadRequestError from foundry import ConfidentialClientAuth from foundry import Config +from foundry import ConflictError from foundry import ConnectionError from foundry import InternalServerError from foundry import NotFoundError @@ -38,6 +39,7 @@ from foundry import ProxyError from foundry import RateLimitError from foundry import ReadTimeout +from foundry import RequestEntityTooLargeError from foundry import StreamConsumedError from foundry import UnauthorizedError from foundry import UnprocessableEntityError @@ -183,19 +185,7 @@ def call_api_helper( ) ) - return client.call_api( - RequestInfo( - method="POST", - resource_path="/abc", - query_params={}, - header_params={}, - path_params={}, - body={}, - body_type=Any, - response_type={}, - request_timeout=None, - ) - ) + return client.call_api(RequestInfo.with_defaults("POST", "/abc")) def test_call_api_400(): @@ -232,6 +222,16 @@ def test_429_error(): call_api_helper(status_code=429, data=EXAMPLE_ERROR) +def test_413_error(): + with pytest.raises(RequestEntityTooLargeError): + call_api_helper(status_code=413, data=EXAMPLE_ERROR) + + +def test_409_error(): + with pytest.raises(ConflictError): + call_api_helper(status_code=409, data=EXAMPLE_ERROR) + + def test_call_api_500(): with pytest.raises(InternalServerError): call_api_helper(status_code=500, data=EXAMPLE_ERROR) diff --git a/tests/test_errors.py b/tests/test_errors.py index f8fb75f79..7f224660d 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -52,28 +52,4 @@ def test_falls_back_to_standard_if_parsing_fails(): ) assert len(w) == 1 - assert not isinstance(error, BranchNotFound) - assert isinstance(error, PalantirRPCException) - assert error.name == "BranchNotFound" - assert error.parameters == { - "datasetRid": "ri.a.b.c.d", - "branchId": 123, - } - - -def test_falls_back_to_standard_if_error_name_no_match(): - error = deserialize_error( - { - "errorName": "DatasetNotFound", - "errorInstanceId": "123", - "parameters": {"datasetRid": "ri.a.b.c.d"}, - }, - { - "AbortTransactionPermissionDenied": AbortTransactionPermissionDenied, - "BranchNotFound": BranchNotFound, - }, - ) - - assert isinstance(error, PalantirRPCException) - assert error.name == "DatasetNotFound" - assert error.parameters == {"datasetRid": "ri.a.b.c.d"} + assert error is None From 69d3d4ea5dba8ab850efc2af4498e43f6f177186 Mon Sep 17 00:00:00 2001 From: svc-changelog Date: Fri, 21 Feb 2025 00:26:15 +0000 Subject: [PATCH 2/2] Add generated changelog entries --- changelog/@unreleased/pr-140.v2.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 changelog/@unreleased/pr-140.v2.yml diff --git a/changelog/@unreleased/pr-140.v2.yml b/changelog/@unreleased/pr-140.v2.yml new file mode 100644 index 000000000..b34279d56 --- /dev/null +++ b/changelog/@unreleased/pr-140.v2.yml @@ -0,0 +1,16 @@ +type: feature +feature: + description: |- + Link error classes to operations. This allows developers to catch specific error conditions when making API requests. For example: + + ```python + from foundry.v2.datasets.errors import DatasetNotFound + + try: + dataset = foundry_client.datasets.Dataset.get("ri.foundry.main.dataset.abc") + ... + except DatasetNotFound as e: + print("Dataset not found", e.parameters["datasetRid"]) + ``` + links: + - https://github.com/palantir/foundry-platform-python/pull/140