errorMetricsHandler()

    errorMetricsHandler()


    Article summary

    errorMetricsHandler()

    Logs a system error metric (which was not the result of a user action).

    For user errors, see userErrorMetricsHandler.

    Signature:

    $badger.errorMetricsHandler(message, visible, code, args)

    Parameters:

    parameterdescriptiondata typerequired?
    messageThe text of the error messageStringYes
    visibleindicates whether the error was displayed to the userBooleanYes
    codeThe error code which was displayed. This can be any value which is meaningful to your X1 App, but defaults to CH_ERRStringNo
    argsOptional arguments to include.The individual properties in args must be primitives (string, numeric or boolean). Nesting of properties is not supported.ObjectNo

    Return Values:

    None.

    Usage Example:

    $badger.errorMetricsHandler("This is an app error", false, "APP-001", { 
        httpStatusCode: '503',
        exception: 'Service timeout',
        responseTimeMs: 836
    });
    

    Mandatory integration:

    Must be called to support the Error Free Session Rate metric of the App Requirements.


    Was this article helpful?

    What's Next