[FRS-453] Adding a link to the FusionReactor request for any error with CFML

[FRS-464] Issue running FusionReactor with OpenJDK 11.0.2 – 11.0.4
[FRS-452] FusionReactor incompatibility when using Web Sockets in WildFly 13 and 14

When running FusionReactor in your ColdFusion / Lucee / Railo server it is possible to add a link to the error handler of your CFML application that will provide you with a link to the errored request in FusionReactor.

This will allow you to access the error details quicker than having to find the request in FusionReactor. This can be done by navigating to Requests > Error History where you will by default see the last 100 errors that occurred.

To do this you can use FRAPI (FusionReactor API) to generate a dynamic link to the direct request. You can add the code below to either a dedicated error handler or inside the catch block of any specific CFML page.

The code:

 <cfscript>
    frapiClass = createObject("java","com.intergral.fusionreactor.api.FRAPI");
    frapi = frapiClass.getInstance();
    request.fusionreactor.transactionId = frapi.getActiveTransaction().getTransactionId();
    request.fusionreactor.host = cgi.local_addr;
    request.fusionreactor.port = frapi.getRunningConfiguration().getStringValue('org.osgi.service.http.port');
    request.fusionreactor.protocol =     frapi.getRunningConfiguration().getStringValue('org.osgi.service.http.port.secure') eq -1 ? 'http://' : 'https://';
    request.fusionreactor.reqdetails = request.fusionreactor.protocol & request.fusionreactor.host & ':' & request.fusionreactor.port & '/fusionreactor/findex.htm?p=reqDetails&id=' & request.fusionreactor.transactionId;
    writedump(request.fusionreactor);
</cfscript>

With this code in place, when an error occurs you will see an output similar to:

[FRS-453] Adding a link to the FusionReactor request for any error with CFML, FusionReactor


Issue Details

Type Technote
Issue Number FRS-453
Resolution Fixed
Last Updated 2019-11-25T11:00:39.913+0000
Fix Version(s) Pending