Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Mikaël Spruyt / Mikaël Spruyt (dreagan_design)
Created: 09/26/2014
Components: Net Protocols, HTTP
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Minor / All users will encounter
Locale/System: English / Win All
Vote Count: 0
Problem Description:
When firing an HTTP-call inside a try-catch statement and it throws an error (on the target's end), the result variable, even though it was added as a parameter to the call, is not available.
Steps to Reproduce:
<cftry>
<cfhttp url="#restUrl##arguments.method#/#arguments.params#" charset="utf-8" throwonerror="true" result="haha" />
<cfcatch type="any">
<cfdump var="#haha#" />
<cfdump var="#cfcatch#" abort />
</cfcatch>
</cftry>
Actual Result:
"variable haha is not defined".
Expected Result:
the actual content of the result variable, with a possible error returned from the target, so that further actions could be based on the actual response.
Any Workarounds:
remove the onThrowError parameter and check for the statuscode returned from the HTTP-call. Based on that information, use the status code and the result variable as needed.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3832126
External Customer Info:
External Company:
External Customer Name: dreagan_design
External Customer Email:
External Test Config: My Hardware and Environment details:
Coldfusion 10,0,13,287689
Tomcat 7.0.23.0
Windows 8 + IIS
java 1.7.0_15
Attachments:
Comments: