@Luca_Lattarini s.pageType variable is used to track 404 pages or error pages, during 404 or error page occurrences only we have to set s.pageType to errorPage. For tracking any other error's happening on site we have to implement using custom variables, for capturing error message either we can request application Dev team to pass error messages(whenever error occurs) on dataLayer or if there is an any unique identifier for error messages then we can grab the error message using that & then we can assign it to custom variable.