tracker issue : CF-4190101

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

onError() and onMissingTemplate() don't work to catch 404 and 405 errors

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Mosh Teitelbaum / Mosh Teitelbaum (Mosh Teitelbaum)

Created: 09/16/2016

Components: REST Services

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: CF2016_Update2 /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Duplicate ID:	CF-4164063

Problem Description:
The onError() method of the Application.cfc does not catch 404 or 405 exceptions ("Not Found" and "Method Not Allowed") generated by REST services.  Similarly, the onMissingTemplate() method does not seem to work at all for REST services.

Steps to Reproduce:
Define onError() and/or onMissingTemplate() methods in a REST Application.cfc then attempt to access an invalid endpoint (404) and a valid endpoint with an invalid VERB (405).  In both situations, ColdFusion's default error message is sent back.

Actual Result:

Expected Result:

Any Workarounds:
Possibly using a site-wide error handler but I'm not sure.

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

Watson Bug ID:	4190101

External Customer Info:
External Company:  
External Customer Name: Mosh Teitelbaum
External Customer Email:  
External Test Config: My Hardware and Environment details:

CF2016 (Update 2)

Win10 (64-bit)

Attachments:

Comments:

OnMissingTemplate() is fixed as part of bug #CF-4164063 and the fix would be available in the next update for CF2016. There is another bug logged #CF-4190050 for onError(). Marking it as a duplicate of #CF-4164063
Comment by HariKrishna K.
1798 | September 21, 2016 05:13:38 AM GMT