Skip to content

Commit

Permalink
handle other edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Collins authored and Chris Collins committed Jul 1, 2022
1 parent 0c3b193 commit a0e394e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const getSchemaAggregationText = (
);
}
default:
throw new Error(`Unsupported schema aggregation assertion ${aggregation} provided.`);
console.error(`Unsupported schema aggregation assertion ${aggregation} provided.`);
return <Typography.Text>Dataset columns are</Typography.Text>;
}
};

Expand All @@ -62,7 +63,8 @@ const getRowsAggregationText = (aggregation: AssertionStdAggregation | undefined
case AssertionStdAggregation.Native:
return <Typography.Text>Dataset rows are</Typography.Text>;
default:
throw new Error(`Unsupported Dataset Rows Aggregation ${aggregation} provided`);
console.error(`Unsupported Dataset Rows Aggregation ${aggregation} provided`);
return <Typography.Text>Dataset rows are</Typography.Text>;
}
};

Expand Down Expand Up @@ -179,7 +181,8 @@ const getAggregationText = (
case DatasetAssertionScope.DatasetColumn:
return getColumnAggregationText(aggregation, fields?.length === 1 ? fields[0] : undefined);
default:
throw new Error(`Unsupported Dataset Assertion scope ${scope} provided`);
console.error(`Unsupported Dataset Assertion scope ${scope} provided`);
return 'Dataset is';
}
};

Expand Down

0 comments on commit a0e394e

Please sign in to comment.