Since records can get removed it would better for users to display a more appropriate error message instead of the current generic error message. Something like "The record you are looking for cannot be found. It has either been removed or does not exist." and perhaps provide a link to the search page. It would be good to serve a 404 here instead of a 500 error too so we can more easily filter which records have errors as to opposed to ones that just don't exist.
Example: https://app.geo.ca/en-ca/map-browser/record/1f593f97-4a4f-cf25-d076-80a71f98494a doesn't exist in the old app either