"""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_CODE_BODY_VALIDATION = 'body_validation_error' ERROR_DONT_HAVE_PERMISSIONS = "You don\'t have access to this resource!" 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_MESSAGE_TIME_OF_DAY_RELEASE = \ 'Time of day Product should be in valid HH:MM:SS format' ERROR_MESSAGE_TIME_ZONE = 'Time Zone should be GMT or local' ERROR_MESSAGE_PRODUCT_NOT_FOUND = 'Requested product id {} not found.' ERROR_MESSAGE_INTEGER_NON_NEGATIVE = '{} must be integer and greater than zero' ERROR_MESSAGE_INVALID_REQUEST_BODY = 'Invalid request body' ERROR_MESSAGE_PRODUCT_ID_DONT_MATCH = \ 'Requested product id does not match with product id in payload' ERROR_MESSAGE_HISTORY_NOT_EXIST = \ 'Product with {} was not delivered to any of the stores previously.' ERROR_MESSAGE_VENDOR_NOT_SIGNED = 'Vendor is not signed.' ERROR_MESSAGE_NON_MATCHING_TIME_VALUES = \ 'Only one pair of sale_date_time and time_offset allowed.' ERROR_MESSAGE_WS_SCHEDULE_UPSERT_FAILED = \ 'Error while upserting workstation product schedule event' ERROR_MESSAGE_WS_SCHEDULE_DELETE_FAILED = \ 'Error while deleting workstation product schedule event' ERROR_MESSAGE_FETCHING_STORES = 'Error while fetching stores' ERROR_MESSAGE_STORE_NOT_FOUND = 'Store not found' # Timed Releases ERROR_MESSAGE_SUPPORTED_TIMED_RELEASE_SET_IN_OA = ( 'Timed releases for supported stores have been set via OA.' ) ERROR_MESSAGE_UNSUPPORTED_TIMED_RELEASE_SET_IN_OA = ( 'Timed releases for unsupported stores have been set via OA.' ) ERROR_MESSAGE_MULTIPLE_SALES_DATE_TIME = ( 'Multiple sales_date_time exists for workstation set ' 'supported timed releases.' ) ERROR_MESSAGE_DIFFERENT_SALES_DATE_TIME = ( 'Different sales_date_time for workstation set supported and ' 'unsupported timed releases.' ) ERROR_MESSAGE_MULTIPLE_USER_TIMEZONE = ( 'Multiple user_timezone values found for workstation set timed releases.' ) ERROR_MESSAGE_UPSERTING_SUPPORTED_TIMED_RELEASE = ( 'Error while upserting supported stores timed release data.' ) ERROR_MESSAGE_UPSERTING_WS_SCHEDULE_FAILED = ( 'Error while upserting event schedule for workstation set timed release.' ) ERROR_MESSAGE_UPSERTING_OA_SCHEDULE_FAILED = ( 'Error while upserting event schedule for OA set timed release.' ) ERROR_MESSAGE_FETCHING_TIMED_RELEASE_FAILED = ( 'Timed release or scheduled update not found for the product.' ) ERROR_MESSAGE_SCHEDULE_NOT_FOUND = ( 'Unsupported stores schedule not found for product_id: {}.' ) SUCCESS_CODE = 'ok' INTERNAL_ERROR = 'internal_error'