"""Generic error messages.""" ERROR_CODE_AUTHORIZATION = "authorization_error" ERROR_CODE_BAD_GRASS_REQUEST = "bad_grass_request_error" ERROR_CODE_NOT_FOUND = "not_found" 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_ORDER_NOT_FOUND = "Order not found for provided order id" ERROR_MESSAGE_SEARCH_REQUEST_NOT_FOUND = "Search request for provided ID was not found" ERROR_CODE_SEARCH_REQUEST_EMPTY = "empty_search_request" ERROR_MESSAGE_SEARCH_REQUEST_EMPTY = "Empty search requests are not allowed" SUCCESS_CODE = "ok" # Generic Validation ERROR_CODE_BAD_REQUEST = "bad_request" ERROR_CODE_VALIDATION = "validation_error" ERROR_MESSAGE_MISSING_QUERY_PARAMS = "Missing required query parameter" # Search-specific validations. ERROR_MESSAGE_INVALID_DATE_RANGE = "Field '{}' must be less or equal to field '{}'." ERROR_MESSAGE_UNKNOWN_FIELD = "Unknown field" ERROR_MESSAGE_DISPLAY_UPC_INVALID = "The following UPCs have invalid format." ERROR_MESSAGE_DISPLAY_UPC_LONG = ( "The following UPCs are longer than the {:d}-character maximum." ) ERROR_MESSAGE_DISPLAY_UPC_SHORT = "UPCs should be at least {:d}-character long." ERROR_MESSAGE_PRODUCT_ID_INVALID = "Release IDs should be integers." ERROR_MESSAGE_PRODUCT_ID_OUT_OF_RANGE = ( "The following Release IDs are invalid because they're not between 0 and {:d}." ) # re-queue validation errors ERROR_CODE_JOBS_NOT_EXIST = "not_exist" ERROR_MESSAGE_JOBS_NOT_EXIST = "Records do not exist" ERROR_CODE_INCORRECT_STATUS = "incorrect_status" ERROR_MESSAGE_INCORRECT_STATUS = "Invalid status for this operation" ERROR_CODE_OLDER_DUPLICATE = "older_duplicate" ERROR_MESSAGE_OLDER_DUPLICATE = "Newer record for these UPC and store exists"