Skip to content

Commit

Permalink
chore: Improve langString error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Sep 8, 2023
1 parent 211d0fb commit 8583f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ You can also check the [release page](https://github.com/visualize-admin/visuali

## Unreleased

Nothing yet.
- Misc
- Improved `langString` error message

# [3.22.4] - 2023-09-06

Expand Down
4 changes: 2 additions & 2 deletions app/rdf/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,8 @@ const buildFilters = ({
const { dataType } = parsedCubeDimension.data;

if (ns.rdf.langString.value === dataType) {
console.warn(
`WARNING: Dimension <${iri}> has dataType 'langString'. Filtering won't work.`
throw new Error(
`Dimension <${iri}> has dataType 'langString', which is not supported by Visualize. In order to fix it, change the dataType to 'string' in the cube definition.`
);
}

Expand Down

0 comments on commit 8583f60

Please sign in to comment.