use the new version of the function SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}', '{locale}'); with a try / catch (and use the old one if the first failed SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}');
If the language does not exist, the query is not failing @mdouchin, only the content is empty. So it does not make it easy to know if the language is supported for now.
@mdouchin you wrote
If the language does not exist, the query is not failing @mdouchin, only the content is empty. So it does not make it easy to know if the language is supported for now.
What would be the behavior you wanted ?