userErrorMetricsHandler()

    userErrorMetricsHandler()


    Article summary

    userErrorMetricsHandler()

    Logs a metric indicating that the user initiated action failed.

    For other errors, see errorMetricsHandler.

    Signature:

    $badger.userErrorMetricsHandler(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 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.userErrorMetricsHandler("This is a user error", true, "USER-001", { httpStatusCode: '401', exception: 'Authorized access', responseTimeMs: 476 });
    

    Mandatory integration:

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


    Was this article helpful?