ColdFusion 10.0  -  Bug 3506757

Created on Tuesday, February 26, 2013

Login for more options

Title

Exceptions in REST Services doesn't trigger Application.cfc's onError or Site-wide Error Handler

Description

Problem Description:
When exceptions occur in ColdFusion 10's new REST Services, the standard exception handling mechanisms don't work.

Steps to Reproduce:
Throw an excaption in CF 10's REST end point.

Actual Result:
Application.cfc's onError and Site-wide Error Handler don't get triggered.

Expected Result:
Application.cfc's onError gets called.

Any Workarounds:
Only time wasting painful workarounds. Some solutions proposed here, but not ideal:

http://stackoverflow.com/q/15015308/188740

Test Configuration

My Hardware and Environment details:

Windows 2008 / Windows 7
ColdFusion 10

App Language(s) English
OS Language(s) English
Platform(s) Win 2008 Server R2 64 bit
Browser(s) Browsers All

Notes (6)

  • Hari Krishna Kallae

    5:49:24 AM GMT+00:00 Dec 18, 2013

    Verified with the latest dev build(#287442), working as expected.

  • Paul Nibin K J

    4:39:42 AM GMT+00:00 Dec 5, 2013

    The Application filter were not running when invoking the webservice method. It was used when we were creating the instance of the service class. So the mappings while executing ting the function. And if the functions threw error, the onError was not called. Moved the application and other required filters while invoking the method.

  • Paul Nibin K J

    9:37:34 AM GMT+00:00 Jun 4, 2013

    Site wide error handler works with REST services. Whiles invoking a REST service, user can specify the "Accept" Header. If the user specifies the accept header as xml or json, the error is caught and a struct with error code and message is serialized to appropriate format. In this case the site wide error handler is not invoked. It is not good to send the whole HTML content in JSON or XML. But if the requested Content-Type is text/html, then the Site wide handler is invoked and the HTML is returned as the response.

    Looking into the onError Application CFC function.

  • JohnnyO5

    10:15:19 AM GMT+00:00 May 6, 2013

    Hi Adobe, it's been a couple months since this has been reported. This is a critical framework bug. Is anyone monitoring this bug forum? Can someone from the ColdFusion team respond?

  • JohnnyO5

    10:05:37 PM GMT+00:00 Apr 6, 2013

    Adobe, can you please respond? We have a large application that we upgraded to CF 10 and we heavily rely on the new REST services, but without error reporting, we're blind to how reliable our app is.

  • JohnnyO5

    8:20:39 AM GMT+00:00 Feb 26, 2013

    Question on how to work around this solution was asked here, but no viable solution was offered.
    http://stackoverflow.com/q/15015308/188740

Duplicate ID
Reported By JohnnyO5

Status

State Closed
Status Fixed
Reason

Importance

Priority 4-Very High
Frequency All users will encounter
Failure Type Non Functioning
Product Area REST Services

Build

Found In Build Final
Fixed In Build 287219

Attachments (0)

No Files Attached

Votes (4)

  • Adam Cameron.

    12:58:07 AM GMT+00:00 Jun 19, 2013

    Should be fixed.

    --
    Adam

  • AlexBaban

    2:32:29 PM GMT+00:00 May 6, 2013

    This is urgent. We're left without proper REST Services exceptions built-in handling.

  • honey-d

    11:44:36 AM GMT+00:00 Apr 1, 2013

    I need to handle errors in a central location when using the REST service. Without onError, I must do something that is not very elegant.

  • henrylearn2rock

    11:01:27 AM GMT+00:00 Feb 26, 2013

    this is horrible, pls fix

Your session has expired! Click to login
Current form data will be preserved

Cancel