import { i64, Option, u32 } from "./_commons"; import { ErrorType } from "./ErrorType"; import { TextVisualErrorData } from "./TextVisualErrorData"; import { JSError } from "./JSError"; import { GQLError } from "./GQLError"; import { CSPError } from "./CSPError"; import { PageCheckError } from "./PageCheckError"; import { ResourceError } from "./ResourceError"; import { PageVisitErrorSource } from "./PageVisitErrorSource"; export interface PageVisitEventError { /** * Type is the type of error ("js", "http", etc) * Renamed to err_type in metroplex */ type: TErr; /** * The URL that failed to do something * We don't require uri validation here because many URLs from errors don't pass it, * but we would like to collect their data. This means there is no guarantee that * the URL is valid later on which should be fine * Maximum length accepted 1024 */ url: string; /** * The HTTP code for the error * Minimum value - 200 * Renamed to http_code in metroplex */ h_code?: TErr extends ErrorType.Http ? Option : never; /** Contains matches from a scanned http response. */ match_report?: TErr extends ErrorType.HttpResponseMatch ? Option : never; /** * The HTTP data sequence number, if any * Renamed to http_data_seq in metroplex */ seq?: Option; /** * JSError has more detailed information about the javascript error * Renamed to js_error in metroplex */ j_err?: TErr extends ErrorType.JS ? Option : never; /** * GQLError has more detailed information about the GraphQL error * Renamed to gql_error in metroplex */ gql_err?: TErr extends ErrorType.Gql ? Option : never; /** CSP error details */ csp_err?: TErr extends ErrorType.Csp ? Option : never; /** * PageCheck error sent from collect to indicate page check assertion failures * Renamed to page_check_error in metroplex */ pagecheck_err?: TErr extends ErrorType.PageCheck ? Option : never; /** * ResourceError has more detailed information about the resource (image, style etc) error * Renamed to res_error in metroplex */ res_err?: TErr extends ErrorType.Resource ? Option : never; /** * err domain of this error's source url. Has a default URL since * we have to manually create it. * Populated on Metroplex side */ err_domain?: never; /** source of the error when it was caught in the front end */ err_src?: Option; }