case ErrorCodes.NOT_FOUND:
return new NotFoundException(error.getMessage(), new Date());
case ErrorCodes.REQUEST_LIMIT_EXCEEDED:
return new RequestLimitExceededException(error.getMessage(), new Date());
case ErrorCodes.INVALID_VECTOR_FORMAT:
return new InvalidVectorFormatException(error.getMessage(), new Date());
case ErrorCodes.TOO_MANY_IDS: