I have a page with liquid code that performs a fetchxml, which is filtered by a guid column. The value it's filtering by uses an id querystring value, but if the id isn't in a guid format (e.g. perhaps a user clicked a link and it truncated the link so it's no longer in a guid format) then it looks like the fetchxml fails, with an error like: "Exception has been thrown by the target of an invocation." - it's a different situation to trying to filter by a guid that doesn't exist - that will not throw an error, you'll just get zero results.
In an ideal world, I'd either be able to pre-validate the id is of a guid format before fetchxml is called, or I want to be able to capture the error when fetchxml fails. This way you can handle the invalid id gracefully.
Is there really no suitable solution to this without swapping for client side WebAPI calls to fetch the data?