tracker issue : CF-4202547

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

[ANeff] Bug for: CF2016 vs Aether wrt custom REST response via cfthrow

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

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

Created: 05/21/2018

Components: REST Services

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.308605 (PreRelease) / 309761

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 1

Issue: CF2016 vs Aether wrt custom REST response via cfthrow

History: Pre-Aether, cfthrow could be used to send a custom REST response as JSON. In Aether, this fails (returns HTML of error handler page).

Steps to Reproduce:
1) Unzip attached app
2) Run index.cfm to register the REST application
3) Run mypage.cfm and compare the output w/ the code comments in mypage.cfm

Actual Result: CF sends cfthrow's custom message as HTML of error handler page

Expected Result: CF sends cfthrow's custom message as JSON

Related URL: https://www.adobe.com/devnet/coldfusion/articles/restful-web-services.html

Related post: http://blog.cfaether.com/2018/05/cf2016-vs-aether-wrt-custom-rest.html

Attachments:

Comments:

Summary: Initially: 1) In non-void UDF, restSetResponse() was ignored 2) In void UDF, cfthrow returned custom REST response as HTML of error handler page (instead of JSON) Both were filed as CF-3546046, but only #2 was fixed (which I've verified in CF2016 Update 1). #1 was re-filed as CF-4198298. In Aether Public Beta Update 1, #1 is fixed but #2's fix was reverted/undone/unfixed. Filed CF-4202547 to re-fix #2. Thanks!, -Aaron
Comment by Aaron N.
27908 | May 22, 2018 07:33:32 AM GMT
HTML formatted response comes when Developer profile settings is enabled. When this settings is turned off, the user sees the response sent by the REST Service as provided in cfthrow. The attached TC works with Developer Profile disabled.
Comment by Nitin K.
27927 | May 23, 2018 05:25:44 PM GMT
Hi Nitin and Krishna, I've confirmed hf201800-4199827.jar gives the expected behavior in Public Beta Update 1 (build 2018.0.01.308605 (PreRelease)). I am more helpful if you guys give me the latest build ;) Thanks very much for providing the hotfix! Thanks!, -Aaron
Comment by Aaron N.
27938 | May 24, 2018 08:36:20 AM GMT