import type { HandleClientError } from '@sveltejs/kit';

export const handleError: HandleClientError = ({ error }) => {
	const err = error as any;

	return {
		message: err?.message || 'An unexpected application error occurred.',
		code: err?.code || 'CRITICAL',
		name: err?.name || 'UNHANDLED_EXCEPTION'
	};
};
