tracker issue : CF-3866282

select a category, or use search below
(searches all categories and all time range)

[ANeff] Bug for: REST exception without produces not triggering site wide error handler

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 12/11/2014

Components: REST Services

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on September 04, 2019 using build 2016.0.01.298513
When a REST exception is thrown, the site-wide error handler is not triggered when the "Accept" header is "text/html", unless the REST service also has attribute produces="text/html"


component { = "ticket_3506757";
THIS.applicationTimeout = createTimeSpan(0,0,0,30);
function onApplicationStart() {
  restInitApplication(expandPath("./"), "foo");

component restpath="a" {remote string function abc() httpmethod="GET" {foo=bar; return "b";}}

<cfhttp url="">
<cfhttpparam type="header" name="Accept" value="text/html">
<cfhttpparam type="header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="header" name="TE" value="deflate;q=0">
<cfdump var="#CFHTTP#">

GET /rest/foo/bar HTTP/1.1
User-Agent: ColdFusion
Accept: text/html
Accept-Encoding: deflate;q=0
Connection: close
TE: deflate;q=0
HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Date: Mon, 08 Dec 2014 07:30:21 GMT
Connection: close
Content-Length: 21

Internal Server Error

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3866282

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:  
External Test Config: CF: CF11 Update 3 (11,0,03,292480) Enterprise Standalone

OS: x64 Win 2008

IIS: 7

Java: 1.7.0_55

isapi_redirect.dll: v1.2.40.0 Modified Monday, ?November ?10, ?2014, ??5:14:48 PM

Site-wide Error Handler: /CFIDE/administrator/templates/secure_profile_error.cfm



Related ticket: #CF-3506757
Comment by External U.
9481 | December 11, 2014 06:09:20 AM GMT
Using the Accept header also for checking whether HTML response can be returned or not. Earlier, it was necessary to specify "produces" argument to "text/html". Now even if produces is not configured, we will check the Accept header of the request. If the Accept header of the request is HTML, then also we are returning the site wide error response back.
Comment by Paul N.
9482 | January 30, 2015 07:23:42 AM GMT
Hi Paul, Perfect, thanks very much! -Aaron
Comment by External U.
9483 | January 30, 2015 07:11:49 PM GMT
Verified the fix, added test case at //depot/qa/cf/regression/coretests/restservices/RESTServices/bugCF-3866282/CF-3866282.cfm
Comment by HariKrishna K.
9484 | September 25, 2015 07:27:53 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31273 | September 04, 2019 08:39:03 AM GMT