Skip to content

The open alternative to Salesforce, designed for AI.

236 B
Raw Blame
import { absoluteUrlSchema } from '@/utils/url/absoluteUrlSchema';

export const getAbsoluteUrlOrThrow = (url: string): string => {
  try {
    return absoluteUrlSchema.parse(url);
  } catch {
    throw new Error('Invalid URL');
  }
};