is this logic not already somewhere? how does core symfony report those error states? does it not already have translations for them?

if we really need it, i propose an array of translation keys indexed by the error codes, to make things more compact. how does the dialog react to the exception? does the user see an error page with this message?