/**
 * Helper function to get a string representation of an error.
 * @param error unknown
 * @returns a string representation of the error
 */
export function getErrorMessage(error: unknown): string {
  if (error instanceof Error) {
    return error.message;
  }
  return String(error);
}
