"""Generic error messages.""" ERROR_CODE_AUTHORIZATION = 'authorization_error' ERROR_CODE_BAD_GRASS_REQUEST = 'bad_grass_request_error' ERROR_CODE_NOT_FOUND = 'not_found' ERROR_CODE_BAD_REQUEST = 'bad_request' ERROR_MESSAGE_MISSING_GRASS_HEADERS = 'Missing Grass Headers' ERROR_MESSAGE_INCOMPLETE_GRASS_HEADERS = 'Incomplete Grass Headers' ERROR_MESSAGE_INVALID_GRASS_ACCOUNT_TYPE = 'Invalid Grass Account Type' ERROR_MESSAGE_FORBIDDEN_USER = 'User is forbidden' ERROR_CODE_UNAUTHORIZED_MANY_ACCOUNTS = 'Unauthorized to access many accounts' ERROR_ALREADY_EXISTS = 'A {object_type} with that name already exists.' ERROR_ENTITY_DOES_NOT_EXIST = '{object_type} {object_id} does not exist.' ERROR_FIELD_MISSING = 'Must be specified.' ERROR_KEY_INVALID = 'Invalid key.' ERROR_INVALID_DATE = 'Must be a date in YYYY-MM-DD format.' ERROR_INVALID_IDS = '{object} IDs must be integers' ERROR_INVALID_OPTION = 'Must be one of {choices}' ERROR_INVALID_DECIMAL = ( 'Must be a number with at most 2 digits after the decimal point.' ) ERROR_PERCENTAGE_NOT_IN_RANGE = 'Must be between 0 and 100.' ERROR_MISSING_JSON_BODY = 'Expecting a JSON body.' ERROR_MISSING_START_AND_END_TERM = ( 'The term start and the term end cannot both be blank.' ) ERROR_INVALID_TERM = 'The term end must be after the term start.' ERROR_MUST_BE_INT = 'Must be an integer greater or equal to 0.' ERROR_MUST_BE_LIST_OF_TYPE = 'Must be a list with elements of type: {type_name}' ERROR_INVALID_LIMIT_OFFSET = 'Limit and offset must be valid integers' ERROR_NO_OPEN_PERIOD = 'No accounting period is currently open.' ERROR_NO_SUMMARY_EXPORT_URL = ( 'No summary export url for Accounting Run {accounting_run_id}' ) ERROR_OPEN_PERIOD_EXISTS = 'Can only create a new accounting period for contract type {contract_type} and statement period {statement_period_id} if all others are closed.' ERROR_INVALID_PERIOD_STATUS = ( 'Accounting period cannot transition from {current_status} to {new_status}' ) ERROR_PERIOD_IS_NOT_LOCKED = ( 'Accounting period should be locked before approving sales files' ) ERROR_INVALID_METADATA = 'Both amount_usd and row_count are required if one is present.' ERROR_INVALID_STATUS_CHANGE = ( '{object_type} cannot transition from {current_status} to {new_status}' ) ERROR_CANNOT_UPDATE = 'The resource you selected cannot be updated.' ERROR_CSV_EMPTY = 'No data found.' ERROR_CSV_EMPTY_FIELDS = 'Empty fields.' ERROR_CSV_INVALID_PERIOD = 'Invalid accounting period ID.' ERROR_CSV_MATCHING_CODES = 'Original and conversion currency codes can not be the same.' ERROR_CSV_MISSING_FIELDS = 'Missing fields.' ERROR_CSV_RATE_INVALID = 'Invalid rate.' ERROR_CSV_UNKNOWN_CURRENCY = 'Currency code not recognized: {code}' ERROR_EXCHANGE_RATE_SAVE = ( 'Saving Fx rate failed. PERIOD:{period} FROM:{from_cur} TO:{to_cur} REASON:{reason}' ) ERROR_RUN_CONTROLLER_NOT_ASSOCIATED = ( 'Can not find run controller associated with specified contract.' ) ERROR_DEFAULT_RUN_CONTROLLER_NOT_FOUND = 'Default run controller was not found.' ERROR_DEFAULT_RUN_CONTROLLER_MUST_EXIST = 'There must be a default controller.' ERROR_DIFFERENT_RUN_CONTROLLER = ( 'You cannot have different run controllers for contracts of the same type on one ' 'account. One or more contracts of type "{contract_type}" use ' '"{run_controller_name}" run controller.' ) ERROR_INVALID_OUTPUT_FORMAT = 'Invalid output format' ERROR_SALES_FILE_IS_NOT_COMPLETE = 'Sales file should be in Complete status' INVALID_REPORT_TYPE = 'Report type must be one of {report_type}' ERROR_STATEMENT_PERIOD_CURRENT_STATUS = ( 'Statement period must be in "current" status to be closed' ) ERROR_NEXT_STATEMENT_PERIOD_NOT_FOUND = ( 'Statement period next to {statement_period_id} could not found' ) ERROR_NO_CURRENT_STATEMENT_PERIOD = 'Selected statement period status must be current' ERROR_RUN_CONTROLLER_DOES_NOT_MATCH_CONTRACT_TYPE = 'Proposed run controller change to `{run_controller_name}` of contract type `{run_controller_contract_type}` does not match Contract `{contract_id}` of contract type `{contract_type}`' ERROR_STATEMENT_PERIOD_HAS_ACC_PERIODS = ( 'You cannot close this statement period because it still contains open' ' accounting periods. Please close those before closing the statement period.' ) ERROR_STATEMENT_PERIOD_NOT_ACCEPTING_FILES = ( 'The statement period is no longer accepting file attachments.' ) ERROR_STATEMENT_PERIOD_PAYMENT_ENTITY_NOT_FOUND = ( 'Cannot find payment_entity {payment_entity_id} associated with ' 'statement period {statement_period_id}.' ) ERROR_STATEMENT_PERIOD_PAYMENT_ENTITY = ( 'This statement period cannot be closed because all payment entities do not have' ' is_visible_to_customer set to true.' ) ERROR_STATEMENT_PERIOD_VALID_REPORT_NOT_FOUND = ( 'No valid report url for Statement Period Adjustment File ' '{statement_period_adjustment_file_id}' ) ERROR_STATEMENT_PERIOD_INVALID_REPORT_NOT_FOUND = ( 'No invalid report url for Statement Period Adjustment File ' '{statement_period_adjustment_file_id}' ) ERROR_STATEMENT_PERIOD_COLLABORATORS = ( "Failed to close collaborators' statements. Please verify all required data is" 'present and retry.' ) ERROR_BALANCES_ARE_NOT_CLOSED = ( 'Balances are not closed for statement period payment entities' ) ERROR_INVALID_STATEMENT_YEARS = 'Statement years must be integers' ERROR_INVALID_STATEMENT_PERIOD_IDS = 'Statement period IDs must be integers' ERROR_INVALID_ADJUSTMENT_FILE_USER_ACTION = 'Invalid user action. It must be {}' ERROR_INVALID_CRITERIA_DUPLICATE_PAYMENT_ENTITIES = ( 'Duplicate reference payment entity ids are not allowed.' ) ERROR_INVALID_CRITERIA_DUPLICATE_PAYMENT_SCHEDULES = ( 'Duplicate payment schedules are not allowed.' ) ERROR_MUST_CONTAIN_AT_LEAST_ONE_VALUE = '{} must contain at least one value.' ERROR_ADJUSTMENT_BATCH_CRITERIA_NOT_FOUND = 'Batch criteria for file ID {} not found.' ERROR_INTEGRITY_CONFLICT = 'Conflict: a database constraint was violated' ERROR_INVALID_DATA = 'Invalid data: a value is out of range or too long' ERROR_BATCH_CRITERIA_ALREADY_EXITS = 'An adjustment file with matching batch criteria already exists for statement period {}.' ERROR_POST_REQUEST_DUPLICATE_RECORDS = ( 'A POST request contains duplicate records with fields {}.' )