<commit_before>import seFree from 'se-free';
import PropTypes from 'prop-types';
import { DateTime } from 'luxon';

import Layout from '../components/Layout';
import Instructions from '../components/Instructions';
import Result from '../components/Result';
import ResultDescription from '../components/ResultDescription';
import ResultWhois from '../components/ResultWhois';

const allowIndexing = ['example.se', 'isfree.se', 'ledig-doman.se', '🦄.se'];

const checkDomainStatus = async (domainTld) => {
  return seFree(domainTld);
};

export async function getEdgeProps({ params }) {<commit_msg>Handle unknown errors from se-free<commit_after>import seFree from 'se-free';
import PropTypes from 'prop-types';
import { DateTime } from 'luxon';

import Layout from '../components/Layout';
import Instructions from '../components/Instructions';
import Result from '../components/Result';
import ResultDescription from '../components/ResultDescription';
import ResultWhois from '../components/ResultWhois';

const allowIndexing = ['example.se', 'isfree.se', 'ledig-doman.se', '🦄.se'];

const checkDomainStatus = async (domainTld) => {
  try {
    return seFree(domainTld);
  } catch (error) {
    return 'NOT_VALID';
  }
};

export async function getEdgeProps({ params }) {
{'fraction_non_alphanumeric': 0.14657210401891252, 'fraction_numerical': 0.0, 'mean_word_length': 5.1352657004830915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4079123', 'n_tokens_mistral': 360, 'n_tokens_neox': 357, 'n_words': 107}