from masters_registry import config BAD_REQUEST_CODE = 'bad_request' BODY_VALIDATION_ERROR = 'body_validation_error' DMS_CARVEOUT_ERROR = 'dms_carveout_error' EMPTY_PAYLOAD_MESSAGE = "JSON payload can't be empty" ERROR_SUBSTORE_CARVEOUTS = ( 'UPC has sub-store carve-out(s)' 'for [{store_name}]: {territories}' ) FAILED_TO_IMPORT_ISRCS = 'Failed to import ISRCS' FAILED_TO_GET_DMS_CARVEOUTS = 'Failed to get DMS carveout' FEATURE_FLAG_IS_NOT_ACTIVE_ERROR = 'feature_is_not_active' FEATURE_FLAG_IS_NOT_ACTIVE = "{feature_flag} feature flag is not active." ERROR_ACCOUNT_DATA_CODE = 'account_data_error' ERROR_ACCOUNT_DATA_REQUIRED_MSG = ( '`account_type` and `account_id` must ' 'be passed in either using Grass Headers or Query Parameters') BULK_TASK_DOES_NOT_EXIST = 'Bulk task does not exist' HEADER_VALIDATION_ERROR = 'header_validation_error' INVALID_DATE_MSG = 'Date is expected to be in YYYY-MM-DD format' INVALID_UPC_TYPE = 'Invalid type of UPC' INVALID_TUID = 'invalid_tuid' INVALID_TUID_ISRC = 'invalid_tuid_isrc' INVALID_TUID_ISRC_MESSAGE = 'TUID does not match with this ISRC.' TUID_DOES_NOT_EXIST_MESSAGE = 'Tuid does not exist.' INVALID_TERRITORIES = 'invalid_territories' TERRITORIES_CLAIMED_BY_THE_SAME_LABEL = 'claimed_by_the_same_label' TERRITORIES_CLAIMED_BY_THE_SAME_LABEL_MESSAGE = ( 'These territories are already claimed by this owner:') TUID_CLAIMED = 'tuid_claimed' TUID_CLAIMED_MESSAGE = 'TUID {0} is already claimed.' NO_TUIDS_ON_GIVEN_TERRITORY = ( 'Account has no tuids on territory {0} of ISRC {1}') NO_INTERNAL_CONFLICTS = 'no_internal_conflicts' NOT_EXISTING_ISRCS_IN_TRACK = 'not_existing_isrcs_in_tracks' NOT_EXISTING_ISRCS_IN_TRACK_MESSAGE = ( 'ISRCs: {0} does not exist in art relations track table. ' 'Please add before locking territories.' ) NOT_EXISTING_ISRCS_IN_ACTIVE = 'not_existing_isrcs_in_active' NOT_EXISTING_ISRCS_IN_ACTIVE_MESSAGE = ( 'ISRCs: {0} does not exist in registry. ' 'Please add before locking territories.' ) MISSING_ARGUMENTS = 'missing_arguments' ISRC_NOT_FOUND = 'isrc_not_found' ISRC_NOT_OWNED_BY_ACCOUNT = 'isrc_not_owned_by_account' ISRC_IMPORT_ERROR = 'Server error during importing ISRC.' NO_ISRC_ERROR = 'Track does not have ISRC.' DELETED_ISRC_UPDATE_ERROR = ('Cannot delete rightsholder claim.' 'ISRC does not exist in Registry') OWS_TERRITORIES_ERROR = 'ows_territories_error' OWS_CONFLICT_MANAGER_ERROR = 'ows_conflict_manager_error' OWS_CARVEOUTS_ERROR = 'ows_carveouts_error' MAX_UPCS_EXCEEDED_CODE = 'max_upcs_per_request_exceeded' MAX_UPCS_EXCEEDED_MESSAGE = ( 'More than {0} has been passed to the service.'.format( config.MAX_UPCS_COUNT)) MISSING_UPCS_CODE = 'missing_upcs_list' MISSING_UPCS_MESSAGE = 'UPCs list was empty or not found in request body.' UPC_BUNDLED = 'UPC contains a video and was removed' UPC_FAIL = 'UPC Fail' UPC_YOUTUBE_CARVED_OUT = 'upc_youtube_carved_out' UPC_YOUTUBE_CARVED_OUT_MESSAGE = 'UPC is carved out from YouTube' UPC_NOT_FOUND = 'UPC does not exist' UPC_NOT_FOR_DISTRIBUTION = 'UPC is Not for Distribution' UPC_WAS_DELETED = 'UPC was deleted' UPC_INVALID_STATUS = 'UPC is not in_content' ERROR_CODE_UPC_VALIDATION_FAILED = 'upcs_validation_failed' INVALID_NUM_RECORDS_CODE = 'invalid_num_records' INVALID_NUM_RECORDS_MESSAGE = 'Invalid number of records.' INVALID_PAGE_OFFSET_CODE = 'invalid_page_offset' INVALID_PAGE_OFFSET_MESSAGE = 'Invalid page offset.' INVALID_BULK_STATUS = 'invalid_bulk_status' INVALID_ORDER_BY = 'invalid_order_by' INVALID_ORDER_BY_MESSAGE = 'Invalid order by value.' INVALID_ORDER_DIRECTION = 'invalid_order_direction' INVALID_ORDER_DIRECTION_MESSAGE = 'Invalid order direction value.' TERRITORIES_CARVE_IN_NOT_FOUND = 'Unable to find territories carve-in' VALIDATION_EXCEPTION = 'ValidationException' USER_IDS_LIST_IS_EMPTY_CODE = 'user_ids_list_is_empty' USER_IDS_LIST_IS_EMPTY_MESSAGE = 'User ids list is empty' YOUTUBE_ERROR_MESSAGE = 'Failed to update Youtube ownership' TASK_WITHOUT_CONTEXT = 'Task does not have context' STORE_DOES_NOT_EXIST = 'Store does not exist' ERROR_CODE_NO_SUCH_BUCKET = 'NoSuchBucket' ERROR_CODE_NOT_FOUND = 'not_found_error' S3_FILE_NOT_FOUND = '{key} not found in bucket the {bucket} bucket' ORCHARD_USER_ID_IS_REQUIRED = 'Orchard-User-Id is a required header' CORRELATION_ID_IS_REQUIRED = 'Correlation-Id is a required header' LOCK_ISRC_ERROR_CODE = 'lock_isrc_error' LOCK_ISRC_ERROR_MESSAGE = "'Lock ISRC' task failed" TRACK_LEVEL_FAILURE = 'Track-level failure'